Skip to content

[Bug]: v4.27.0 fails to deploy to netlify with non-zero exit code 3 #1689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 tasks
marika-jane opened this issue Oct 17, 2022 · 1 comment
Closed
2 tasks
Labels
type: bug code to address defects in shipped code

Comments

@marika-jane
Copy link

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' }

image

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

  1. Open a pull request on github (this was already open as a draft and was already deployed to a deploy preview branch).
  2. Push a new commit to this branch.
  3. 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.
@marika-jane marika-jane added the type: bug code to address defects in shipped code label Oct 17, 2022
@gfirem
Copy link

gfirem commented Oct 18, 2022

I think this is related to #1690

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

2 participants