Next.js: SyntaxError: Invalid regular expression: /(?<!node_modules.*)[\\/]node_modules[\\/](react|react-dom|scheduler|prop-types|use-subscription)[\\/]/: Invalid group in webpack-config.js

Created on 5 Nov 2019  路  2Comments  路  Source: vercel/next.js

Hello,
I'm working on MacOS, with NodeJS v8.9.1, npm v6..12.1.
In getting started tutorial, in setup stage, when I get to the "npm run dev" command, I get this error:

[email protected] dev /Users/ronyperez/hello-next
next

[ wait ] starting the development server ...
[ info ] waiting on http://localhost:3000 ...
SyntaxError: Invalid regular expression: /(?\/[\/]/: Invalid group
at getBaseWebpackConfig (/Users/ronyperez/hello-next/node_modules/next/dist/build/webpack-config.js:15:205)
at HotReloader.getWebpackConfig (/Users/ronyperez/hello-next/node_modules/next/dist/server/hot-reloader.js:14:1337)
at
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: next
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

When I remove (? From tests I've done on regular expression tester online, I get this error about the asterisk:
A quantifier inside a lookbehind makes it non-fixed width

Hopes this helps

Most helpful comment

You're required to be running Node 8.10 or newer. Sorry about this!

All 2 comments

You're required to be running Node 8.10 or newer. Sorry about this!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jesselee34 picture jesselee34  路  3Comments

YarivGilad picture YarivGilad  路  3Comments

wagerfield picture wagerfield  路  3Comments

knipferrc picture knipferrc  路  3Comments

YarivGilad picture YarivGilad  路  3Comments