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

I can not even complete the first steps when installing next.js #5325

Closed
rrubiorr81 opened this issue Sep 28, 2018 · 2 comments
Closed

I can not even complete the first steps when installing next.js #5325

rrubiorr81 opened this issue Sep 28, 2018 · 2 comments

Comments

@rrubiorr81
Copy link

Bug report

I can not even complete the first steps when installing next.js

Describe the bug

So, i'm just following the guide that the guys is nextjs.org have put in place which seem quite good. https://nextjs.org/learn/basics/getting-started/setup

To Reproduce

When i get to the point i run [after just a couple basic steps]

npm run dev

i get immediately a nasty error:

hello-next npm run dev

> hello-next@1.0.0 dev /Users/myuser/Projects/ssr/hello-next
> next

/Users/myuser/Projects/ssr/hello-next/node_modules/hard-source-    webpack-plugin/index.js:106
}
^
SyntaxError: Unexpected token }
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/myuser/Projects/ssr/hello-next/node_modules/next/dist/build/webpack.js:64:55)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hello-next@1.0.0 dev: `next`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hello-next@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/myuser/.npm/_logs/2018-09-27T22_05_37_582Z-debug.log

This has to be something in my system, but i wonder what. I tried it in my laptop and it also happens there.

I went to this file and looks super normal, located in node_modules/hard-source-webpack-plugin/index.js:

function contextNormalLoaders(compiler, loaders) {
  return loaders.map(loader =>
    Object.assign({}, loader, {
      loader: contextNormalPath(compiler, loader.loader),
    }),
  );
}

I've looked around to see if anyone had had this error, and found nothing like this. Ideas?

I tried making sure webpack was not global. Same result.

@timneutkens
Copy link
Member

timneutkens commented Sep 29, 2018

It sounds like you're on a Node.js version below 8, try checking node -v

@rrubiorr81
Copy link
Author

@timneutkens that was it! thanks..! i'm wondering if somewhere in the docs is stated that this library is for node > 8.. or if this is something that's somehow expected..

@lock lock bot locked as resolved and limited conversation to collaborators Sep 30, 2019
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

2 participants