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

Errors when trying the minimal setup #581

Closed
dmitriz opened this issue Dec 31, 2016 · 11 comments
Closed

Errors when trying the minimal setup #581

dmitriz opened this issue Dec 31, 2016 · 11 comments
Assignees

Comments

@dmitriz
Copy link

dmitriz commented Dec 31, 2016

The minimal setup at the beginning of
https://zeit.co/blog/next

seems to generate cryptic errors:

ERROR  Failed to compile with 4 errors

These dependencies were not found in node_modules:

* ./pages/index.js?entry
* /Users/dmitrizaitsev/Dropbox/Sandbox/nextjs-test/node_modules/next/dist/pages/_error.js?entry
* /Users/dmitrizaitsev/Dropbox/Sandbox/nextjs-test/node_modules/next/dist/pages/_error-debug.js?entry
* /Users/dmitrizaitsev/Dropbox/Sandbox/nextjs-test/node_modules/next/dist/pages/_document.js?entry

Did you forget to run npm install --save for them?
> Ready on http://localhost:3000

npm install does not help :(

@nkzawa
Copy link
Contributor

nkzawa commented Dec 31, 2016

It looks weird. Let me know how your project directory looks like.

@dmitriz
Copy link
Author

dmitriz commented Dec 31, 2016

Here is the clone of my directory:

https://github.com/dmitriz/nextjs-test

@arunoda
Copy link
Contributor

arunoda commented Dec 31, 2016

@dmitriz could you tell us your dev env?

  • OS
  • Node version
  • NPM version

@cncolder
Copy link
Contributor

cncolder commented Dec 31, 2016

@arunoda Same as me after upgrade to v2.0.0-beta6

macOS 10.12.2
node@v7.3.0
yarn@0.18.1

@cncolder
Copy link
Contributor

When I run next build. I saw an error like this:

Module not found: Error: Can't resolve 'babel-loader'

And I change webpack config as below then resolve it.

webpack: (config, { dev }) => {
    config.resolveLoader.modules.push(path.join(process.cwd(), 'node_modules'))
    return config
}

Maybe this is a difference between webpack@1 and webpack@2.

@dmitriz
Copy link
Author

dmitriz commented Dec 31, 2016

node -v; npm -v
v6.9.2
4.0.5

Mac OSX 10.8.5

@arunoda
Copy link
Contributor

arunoda commented Dec 31, 2016

@nkzawa this happens when we install it from NPM or via file:///.
Works with npm link.

@arunoda
Copy link
Contributor

arunoda commented Dec 31, 2016

@cncolder Thanks for the hint.
Yep. It was the issue.

I've added app's node modules dir into resolve loaders by default via #583.
It'll fix this issue.

@arunoda
Copy link
Contributor

arunoda commented Dec 31, 2016

Guys, try: next@2.0.0-beta.7

@sarovin
Copy link
Contributor

sarovin commented Dec 31, 2016

@arunoda Yes, it fix for me...

@dmitriz
Copy link
Author

dmitriz commented Dec 31, 2016

Works now!

Many thanks for fixing it so quick!

@lock lock bot locked as resolved and limited conversation to collaborators May 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants