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

App crashing when importing prejss: Module not found require-from-string #22

Open
Vadorequest opened this issue Feb 7, 2018 · 3 comments

Comments

@Vadorequest
Copy link

Vadorequest commented Feb 7, 2018

I'm running into a very weird issue when npm i -S prejss and then use import preJSS from 'prejss'; in my project, the compilation fails with:

Failed to compile.

./node_modules/require-from-string/index.js
Module not found: Can't resolve 'module' in '/Users/vadorequest/dev/student-loan-simulator/node_modules/require-from-string'

Isn't that a missing dependency?

I tried to install it npm install --save require-from-string but then another compilation error:

Failed to compile.

./node_modules/cosmiconfig/node_modules/require-from-string/index.js
Module not found: Can't resolve 'module' in '/Users/vadorequest/dev/student-loan-simulator/node_modules/cosmiconfig/node_modules/require-from-string'

If I remove import preJSS from 'prejss'; then it compiles correctly.

@Vadorequest Vadorequest changed the title App crashing when installing prejss: Module not found require-from-string App crashing when importing prejss: Module not found require-from-string Feb 7, 2018
@Vadorequest
Copy link
Author

May be related to facebook/react-native#4968 and not to prejss at all. (TL;DR; npm cache messing things up)

Hard to debug, hard to tell. Haven't tried again.

@dforsl
Copy link

dforsl commented Apr 5, 2018

@Vadorequest Did you find a solution to the problem? I'm running into the same issue, tho using Yarn.

@Vadorequest
Copy link
Author

@dforsl it may be due to installing packages with different version of npm/yarn, like for instance I may have had installed part of my package using 8.10 and prejss with 6.10 or something like that.

Deleting and reinstalling node modules may help, or not. I don't remember what I did with prejss and I've moved on since

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