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

Sudden weird errror in url... #38

Open
gnimmelf opened this issue Feb 12, 2018 · 3 comments
Open

Sudden weird errror in url... #38

gnimmelf opened this issue Feb 12, 2018 · 3 comments

Comments

@gnimmelf
Copy link

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

@gnimmelf
Copy link
Author

gnimmelf commented Feb 12, 2018

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!

@daanaerts
Copy link

+1 same error here

@robbyemmert
Copy link

Should we roll back to a specific version? In the meantime, is there a workaround?

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

3 participants