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

Doesn't work when installed with npm 3.x #19

Closed
andreypopp opened this issue Aug 10, 2015 · 8 comments
Closed

Doesn't work when installed with npm 3.x #19

andreypopp opened this issue Aug 10, 2015 · 8 comments

Comments

@andreypopp
Copy link

File webpack.config.coffee assumes too much about how npm layouts modules when installing them. npm 3.x is radically different than npm 2.x in this regard and so gatsby doesn't work.

Suggestion is to use require.resolve instead of relying on ../../node_modules paths (webpack-dev-server entry points). resolveLoader.modulesDirectories also needs a tweak.

@KyleAMathews
Copy link
Contributor

Thanks for the report! Will work on this later. From Slack discussion, it sounds like I started the project on NPM 2.x then moved to 3.x which means the old npm node_module structure was retained.

@KyleAMathews
Copy link
Contributor

Despite several attempts, I've been unable to reproduce this. Can you give me more details about the problems you're seeing?

@freiksenet
Copy link
Contributor

When doing gatsby serve

Uncaught Error: Cannot find module "node_modules/gatsby/lib/utils/../../node_modules/webpack-dev-server/client?0.0.0.0:1400"webpackMissingModule @ multi_main:1(anonymous function) @ multi_main:1(anonymous function) @ bundle.js:551__webpack_require__ @ bundle.js:521(anonymous function) @ bundle.js:544(anonymous function) @ bundle.js:547

@freiksenet
Copy link
Contributor

Probably because npm@3 dedupes stuff.

@frol
Copy link

frol commented Nov 18, 2015

I have the same issue here on Arch Linux with npm 3.4.0.

@fson
Copy link
Contributor

fson commented Dec 14, 2015

Fixed in #102.

@scottnonnenberg
Copy link
Contributor

@fson Any reason to keep this issue open?

@fson
Copy link
Contributor

fson commented Mar 13, 2016

We've been using Gatsby with npm3 for a few months now, and it should work without problems.

We can always open a new issue, if some specific problem is discovered.

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

6 participants