elmasse / nextein

A static site generator with markdown + react for Next.js

Home Page:https://nextein.elmasse.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nextein dev error with next 8.0.0

elmasse opened this issue · comments

Related: vercel/next.js#6240

 ERROR  Failed to compile with 1 errors                                                                     8:41:01 PM

 error  in /Users/elmasse/Projects/elmasse/nextein-ws/node_modules/next/dist/client/next-dev.js

Module parse failed: Unexpected token (34:6)
You may need an appropriate loader to handle this file type.
| 
| 
> import('./noop');
| var _window = window,
|     assetPrefix = _window.__NEXT_DATA__.assetPrefix;

Possible workaround:

  • Remove package-lock.
  • Install webpack@4.28.4 as devDependency.

I had this issue upgrading to Next 8 too and solved by installing acorn package. I am not sure if this is related to Nextein. I think it is a NextJS bug.

Hi @verzola

Yes, it seems related to NextJS. It's strange since I have some others projects I moved to next-8 and I haven't seen any issue so far. Maybe there is a transitive dependency somewhere.
But for instance in nextein-example I had to add both webpack@4.28.4 and acorn@6.0.5 to devDependencies in order to get nextein dev back to work.