-
Notifications
You must be signed in to change notification settings - Fork 92
-
Hello, I started getting this error out of nowhere from today. It was working fine but it suddenly stopped working since last deploy.
While building, it throws:
5:15:45 PM: > .netlify/functions-internal/next_api/nextPage/pages/api.js:166:34: error: Could not resolve "../webpack-runtime.js" 5:15:45 PM: 166 │ var __webpack_require__ = require("../webpack-runtime.js"); 5:15:45 PM: ╵ ~~~~~~~~~~~~~~~~~~~~~~~ 5:15:46 PM: 5:15:46 PM: ──────────────────────────────────────────────────────────────── 5:15:46 PM: Dependencies installation error 5:15:46 PM: ──────────────────────────────────────────────────────────────── 5:15:46 PM: 5:15:46 PM: Error message 5:15:46 PM: A Netlify Function failed to require one of its dependencies. 5:15:46 PM: Please make sure it is present in the site's top-level "package.json". 5:15:46 PM: Build failed with 1 error: 5:15:46 PM: .netlify/functions-internal/next_api/nextPage/pages/api.js:166:34: error: Could not resolve "../webpack-runtime.js"
I tried building my site locally as well but it throws same error.
After looking at the file .netlify/functions-internal/next_api/nextPage/pages/api.js:166:34, looks like it's trying to require ../webpack-runtime.js but there's a file webpack-api-runtime.js instead 🤔
default
after changing
Beta Was this translation helpful? Give feedback.
All reactions
This issue was fixed after removing lockfile & running yarn add -D @netlify/plugin-nextjs@beta
Looks like something messed up with the installation of @netlify/plugin-nextjs which caused this problem
Replies: 2 comments 2 replies
-
This issue was fixed after removing lockfile & running yarn add -D @netlify/plugin-nextjs@beta
Looks like something messed up with the installation of @netlify/plugin-nextjs which caused this problem
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
This issue is that you still have the functions from the old version of the plugin. You should delete .netlify/functions-internal and rebuild. The next beta will check and warn for this.
Beta Was this translation helpful? Give feedback.
All reactions
-
This issue is that you still have the functions from the old version of the plugin. You should delete
.netlify/functions-internaland rebuild. The next beta will check and warn for this.
@ascorbic How do we delete this ? Don't see controls for this on the Netlify admin panel
Beta Was this translation helpful? Give feedback.
All reactions
-
Clear the cache and deploy. If you have any next_ functions committed to netlify/functions then they should be deleted.
Beta Was this translation helpful? Give feedback.