Next.js: TypeError: Failed to fetch dynamically imported module after upgrading to v9.3.5

Created on 16 Apr 2020  路  9Comments  路  Source: vercel/next.js

Bug report

Congratulations on the new release! Just upgraded to 9.3.5 from 9.1.0 and we've run into TypeError: Failed to fetch dynamically imported module http://localhost:8081/_next/static/runtime/dev/noop

Describe the bug

The bug is not breaking our build but is showing in the browser console.
next errors zoome

To Reproduce

yarn upgrade next@latest
yarn build
next dist --p 8081

Expected behavior

Not having errors in the console

System information

  • OS: macOS Catalina 10.15.3
  • Browser: Chrome 80
  • Version of Next.js: 9.3.5
  • Version of Node.js: 10.17.0
  • Version of Yarn: 1.22.4

Aditional Information

Here are some of our dependencies that I think are interacting with next
```"devDependencies": {
"@types/react": "16.9.1",
"@types/react-dom": "^16.9.0",
"@types/webpack": "^4.4.34",
"@zeit/next-css": "^1.0.1",
"@zeit/next-mdx": "^1.2.0",
"babel-loader": "^8.0.6",
"concurrently": "^4.1.1",
"copy-webpack-plugin": "^5.1.1",
"csstype": "2",
"http-server": "^0.11.1",
"next": "^9.1.0",
"next-images": "^1.1.0",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-helmet": "^5.2.1",
"webpack": "^4.17.1",
"webpack-cli": "^3.1.0"
},
"resolutions": {
"react": "16.9.0"
},
"peerDependencies": {
"react": ">= 16.8.0 < 17",
"react-dom": ">= 16.8.0 < 17",
},

please add a complete reproduction

All 9 comments

Can you provide a complete reproduction?

Hey @timneutkens, can you hint me at what info can be useful? I've added the dependencies in the description.

A repository, the code that you're running where you see the issue.

Hey @timneutkens! Sorry for the delay, we had Easter holidays here.
Here's a repo which is reproducing the issue:
https://github.com/Daniel-Georgiev/create-next-app

Note: I've tried bumping react@latest & react-dom@latest just to be sure the issue was still present and it was.

@Daniel-Georgiev it looks like this is due to you having a custom resolution for acorn here: https://github.com/Daniel-Georgiev/create-next-app/blob/64cc72f085147c9fd7f5f75f410fca0682aee946/package.json#L39

Is there a specific reason you are trying to resolve to that version?

Hey @ijjk, thank you for the response. A security alert in github was triggered and it suggested upgrading [email protected] across all dependencies.

It sounds like the security alert you may be referencing is the one for Regular Expression Denial of Service in acorn. This alert is triggered as dangerous since the security alerts don't take into account where the code is being used. In this case acorn is used to process code you have added to the project. acorn is also only used during build time and should not be included in resulting build bundles at all.

It is best to not try to manually resolve packages like this and let us maintain the correct versions of packages unless you are sure the versions are compatible with all the packages that rely on it and it doesn't make sense for the package to be updated upstream also. In this case it does not appear to be compatible with all installed packages causing the above error

Got it! Thanks @ijjk, you've been very helpful!

Guess this can be closed since it's not an issue directly in Next.js?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

knipferrc picture knipferrc  路  3Comments

flybayer picture flybayer  路  3Comments

swrdfish picture swrdfish  路  3Comments

pie6k picture pie6k  路  3Comments

havefive picture havefive  路  3Comments