Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error if some files are ESM #20

Open
kuraga opened this issue Oct 19, 2018 · 0 comments
Open

Error if some files are ESM #20

kuraga opened this issue Oct 19, 2018 · 0 comments

Comments

@kuraga
Copy link

kuraga commented Oct 19, 2018

Minimal example:
rollup-issue2.zip, then node build.js.

Result:

Error: 'default' is not exported by another.js
    at error (/home/sasha/rollup_issue2/node_modules/rollup/dist/rollup.js:3460:30)
    at Module.error (/home/sasha/rollup_issue2/node_modules/rollup/dist/rollup.js:13358:9)
    at handleMissingExport (/home/sasha/rollup_issue2/node_modules/rollup/dist/rollup.js:13048:21)
    at Module.traceVariable (/home/sasha/rollup_issue2/node_modules/rollup/dist/rollup.js:13466:17)
    at ModuleScope.findVariable (/home/sasha/rollup_issue2/node_modules/rollup/dist/rollup.js:12713:29)
    at Identifier$$1.bind (/home/sasha/rollup_issue2/node_modules/rollup/dist/rollup.js:10111:40)
    at CallExpression.NodeBase.bind (/home/sasha/rollup_issue2/node_modules/rollup/dist/rollup.js:9179:31)
    at CallExpression.bind (/home/sasha/rollup_issue2/node_modules/rollup/dist/rollup.js:10224:31)
    at ExpressionStatement$$1.NodeBase.bind (/home/sasha/rollup_issue2/node_modules/rollup/dist/rollup.js:9183:23)
    at Program.NodeBase.bind (/home/sasha/rollup_issue2/node_modules/rollup/dist/rollup.js:9179:31)

Note: see another.js.

We can have the same error without any "Node globals" such as process: just remove rollup-plugin-commonjs Rollup plugin from building and replace process by 'something'.

/cc @calvinmetcalf

@kuraga kuraga changed the title Required code with process inside blocks rollup-plugin-commonjs Rollup plugin (if some files are ESM) Error if some files are ESM May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant