Sudden weird errror in url...
gnimmelf opened this issue · comments
Hi.
I got this error:
[!] Error: 'toASCII' is not exported by node_modules/punycode/punycode.js
https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
node_modules/rollup-plugin-node-builtins/src/es6/url.js (23:8)
21:
22:
23: import {toASCII} from 'punycode';
^
24: import {isObject,isString,isNullOrUndefined,isNull} from 'util';
25: import {parse as qsParse,stringify as qsStringify} from 'querystring';
The weird thing is that it worked fine until I deduped the node modules. I then rm -rf
'ed node_modules and installed anew. Same error. Then npm update
, but same error.
Any ideas? Thanks.
"devDependencies": {
"babel-core": "^6.26.0",
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-syntax-object-rest-spread": "^6.13.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-function-bind": "^6.22.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-react-jsx": "^6.24.1",
"babel-preset-env": "^1.6.1",
"babel-preset-latest": "^6.24.1",
"babel-preset-react": "^6.24.1",
"cssnano": "^3.10.0",
"lost": "^8.2.0",
"npm": "^5.6.0",
"postcss-cssnext": "^3.1.0",
"postcss-nested": "^3.0.0",
"postcss-simple-vars": "^4.1.0",
"rollup-analyzer-plugin": "^1.1.1",
"rollup-plugin-async": "^1.2.0",
"rollup-plugin-babel": "^3.0.3",
"rollup-plugin-commonjs": "^8.3.0",
"rollup-plugin-json": "^2.3.0",
"rollup-plugin-node-builtins": "^2.1.2",
"rollup-plugin-node-globals": "^1.1.0",
"rollup-plugin-node-resolve": "^3.0.2",
"rollup-plugin-postcss": "^1.2.8",
"rollup-plugin-replace": "^2.0.0",
"rollup-plugin-uglify": "^2.0.1",
"uglify-es": "^3.3.10"
},
And rollup.config.js
Ok, it's probably my bad, I changed rollup-plugin-node-resolve::preferBuiltins
from true
to false
. Setting it back to true
resolved the error.
However, changing the import statement in ../es/url.js
to a relative path solved it on preferBultins=false
:
import {toASCII} from 'punycode';
=> import {toASCII} from './punycode';
Feel free to close this if this is expected behavior.
Cheers!
+1 same error here
Should we roll back to a specific version? In the meantime, is there a workaround?