You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When deploying to Netlify on the recently updated version of this plugin, I encounter the following error:
Deploy failed due to an error in @netlify/plugin-nextjs plugin.
Plugin "@netlify/plugin-nextjs" internal error
Could not import plugin:
Error: Cannot find module 'next/dist/build/analysis/extract-const-value'
Require stack:
/opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-nextjs/lib/helpers/analysis.js
/opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-nextjs/lib/helpers/functions.js
/opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-nextjs/lib/index.js
While loading "@netlify/plugin-nextjs" from Netlify app at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15) at Function.Module._load (node:internal/modules/cjs/loader:833:27) at Module.require (node:internal/modules/cjs/loader:1057:19) at require (node:internal/modules/cjs/helpers:103:18) at Object. (/opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-nextjs/lib/helpers/analysis.js:28:31) at Module._compile (node:internal/modules/cjs/loader:1155:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10) at Module.load (node:internal/modules/cjs/loader:1033:32) at Function.Module._load (node:internal/modules/cjs/loader:868:12) at Module.require (node:internal/modules/cjs/loader:1057:19)
Error properties: { code: 'MODULE_NOT_FOUND' }
I had deployed the same commit only 30 minutes prior (before this version was updated), so I am assuming it is related to the new version 4.27.0.
Steps to reproduce
Open a pull request on github (this was already open as a draft and was already deployed to a deploy preview branch).
Push a new commit to this branch.
The automatic deploy fails due to the above error.
A link to a reproduction repository
No response
Next Runtime version
4.27.0
More information about your build
I am building using the CLI
I am building using file-based configuration (netlify.toml)
What OS are you using?
No response
Your netlify.toml file
`netlify.toml`
# Paste content of your `netlify.toml` file here
Your public/_redirects file
`_redirects`
# Paste content of your `_redirects` file here
Your next.config.js file
`next.config.js`
# Paste content of your `next.config.js` file here. Check there is no private info in there.
Builds logs (or link to your logs)
Build logs
# Paste logs here
Function logs
Function logs
# Paste logs here
.next JSON files
generated .next JSON files
# Paste file contents here. Please check there isn't any private info in them
# You can either build locally, or download the deploy from Netlify by clicking the arrow next to the deploy time.
The text was updated successfully, but these errors were encountered:
Summary
When deploying to Netlify on the recently updated version of this plugin, I encounter the following error:
Deploy failed due to an error in @netlify/plugin-nextjs plugin.
Plugin "@netlify/plugin-nextjs" internal error
Could not import plugin:
Error: Cannot find module 'next/dist/build/analysis/extract-const-value'
Require stack:
/opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-nextjs/lib/helpers/analysis.js
/opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-nextjs/lib/helpers/functions.js
/opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-nextjs/lib/index.js
While loading "@netlify/plugin-nextjs" from Netlify app at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15) at Function.Module._load (node:internal/modules/cjs/loader:833:27) at Module.require (node:internal/modules/cjs/loader:1057:19) at require (node:internal/modules/cjs/helpers:103:18) at Object. (/opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-nextjs/lib/helpers/analysis.js:28:31) at Module._compile (node:internal/modules/cjs/loader:1155:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10) at Module.load (node:internal/modules/cjs/loader:1033:32) at Function.Module._load (node:internal/modules/cjs/loader:868:12) at Module.require (node:internal/modules/cjs/loader:1057:19)
Error properties: { code: 'MODULE_NOT_FOUND' }
I had deployed the same commit only 30 minutes prior (before this version was updated), so I am assuming it is related to the new version 4.27.0.
Steps to reproduce
A link to a reproduction repository
No response
Next Runtime version
4.27.0
More information about your build
netlify.toml
)What OS are you using?
No response
Your netlify.toml file
`netlify.toml`
# Paste content of your `netlify.toml` file here
Your public/_redirects file
`_redirects`
# Paste content of your `_redirects` file here
Your
next.config.js
file`next.config.js`
# Paste content of your `next.config.js` file here. Check there is no private info in there.
Builds logs (or link to your logs)
Build logs
Function logs
Function logs
.next JSON files
generated .next JSON files
The text was updated successfully, but these errors were encountered: