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

Need to explicitly install webidl-conversions #59

Closed
ngryman opened this issue Oct 31, 2017 · 4 comments
Closed

Need to explicitly install webidl-conversions #59

ngryman opened this issue Oct 31, 2017 · 4 comments

Comments

@ngryman
Copy link

ngryman commented Oct 31, 2017

Hey,

I'm using [email protected] and I've got a the following error:

Error: Cannot find module 'webidl-conversions'
    at Function.Module._resolveFilename (module.js:527:15)
    at Function.Module._load (module.js:476:23)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/ngryman/Projects/react-element-portal/node_modules/domexception/lib/DOMException.js:3:21)
    at Module._compile (module.js:624:30)
    at Module._extensions..js (module.js:635:10)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/ngryman/Projects/react-element-portal/node_modules/babel-register/lib/node.js:152:7)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/ngryman/Projects/react-element-portal/node_modules/domexception/lib/public-api.js:3:18)
    at Module._compile (module.js:624:30)
    at Module._extensions..js (module.js:635:10)

Explicitly installing the webidl-conversions package resolves the problem. I don't know if it's related to jsdom though.

@lukechilds
Copy link
Owner

In a fresh directory I get:

$ npm install browser-env
+ [email protected]
added 94 packages in 4.853s

$ node -e "console.log(require('browser-env'))"
[Function: browserEnv]

Possibly something strange in your setup?

Gonna close this issue as it seems to be unrelated to browser-env or jsdom. Feel free to re-open if you find otherwise.

@ngryman
Copy link
Author

ngryman commented Nov 1, 2017

@lukechilds Thanks for the feedback. I am using it with ava following their guide: https://github.com/avajs/ava/blob/master/docs/recipes/browser-testing.md.

I'll dig a little deeper my side to see if it could be related to my setup, which is kind of basic, and get back to you.

@ngryman
Copy link
Author

ngryman commented Nov 1, 2017

For posterity, removing my package-lock.json file and doing a fresh install worked. It might come from the fact I was using jsdom before switching to browser-env, and somehow npm got lost on the way 🤷‍♂️

@lukechilds
Copy link
Owner

npm 5 is buggy as hell, you should use either npm 4 or yarn.

I can't tell you the amount of development hours I lost on npm 5 due to it doing weird shit.

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

2 participants