Skip to content
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

[Bug]: @netlify/plugin-nextjs is messing up everything #2413

Closed
3 tasks
gocreating opened this issue Jan 31, 2024 · 2 comments
Closed
3 tasks

[Bug]: @netlify/plugin-nextjs is messing up everything #2413

gocreating opened this issue Jan 31, 2024 · 2 comments
Labels
type: bug code to address defects in shipped code v4 Issues related to the v4 Next.js runtime

Comments

@gocreating
Copy link

Summary

The plugin @netlify/plugin-nextjs keeps failing my installation.

A link to a reproduction repository

(it's a private repo)

Expected Result

Correctly installation

Actual Result

12:06:58 AM: build-image version: fcb0c1b3ada6d25c1cb58e8bc514f5f23cc14f15 (focal)
12:06:58 AM: buildbot version: b01fe4bfba24ebbf2be94776e35d0c0d9decd607
12:06:58 AM: Fetching cached dependencies
12:06:58 AM: Starting to download cache of 851.0MB
12:07:04 AM: Finished downloading cache in 6.234s
12:07:04 AM: Starting to extract cache
12:07:09 AM: Finished extracting cache in 4.841s
12:07:11 AM: Finished fetching cache in 12.323s
12:07:11 AM: Starting to prepare the repo for build
12:07:11 AM: Preparing Git Reference refs/heads/main
12:07:13 AM: Custom build path detected. Proceeding with the specified path: "packages/iam-api"
12:07:13 AM: Custom publish path detected. Proceeding with the specified path: "packages/iam-api/.next"
12:07:13 AM: manpath: warning: $PATH not set
12:07:14 AM: Starting to install dependencies
12:07:14 AM: Python version set to 3.8
12:07:14 AM: Attempting Ruby version 2.7.2, read from environment
12:07:14 AM: Using Ruby version 2.7.2
12:07:15 AM: Started restoring cached go cache
12:07:15 AM: Finished restoring cached go cache
12:07:16 AM: go version go1.19.13 linux/amd64
12:07:16 AM: Using PHP version 8.0
12:07:17 AM: Started restoring cached Node.js version
12:07:18 AM: Finished restoring cached Node.js version
12:07:18 AM: v16.20.2 is already installed.
12:07:19 AM: Now using node v16.20.2 (npm v8.19.4)
12:07:19 AM: Enabling Node.js Corepack
12:07:19 AM: Started restoring cached build plugins
12:07:19 AM: Finished restoring cached build plugins
12:07:19 AM: Started restoring cached corepack dependencies
12:07:19 AM: Finished restoring cached corepack dependencies
12:07:19 AM: Started restoring cached yarn cache
12:07:19 AM: Finished restoring cached yarn cache
12:07:19 AM: yarn workspaces detected
12:07:19 AM: Started restoring workspace packages/cardog-api node modules
12:07:19 AM: Finished restoring workspace packages/cardog-api node modules
12:07:19 AM: Started restoring workspace packages/iam-api node modules
12:07:19 AM: Finished restoring workspace packages/iam-api node modules
12:07:19 AM: Started restoring workspace root node modules
12:07:19 AM: Finished restoring workspace root node modules
12:07:19 AM: Installing npm packages using Yarn version 1.22.19
12:07:19 AM: yarn install v1.22.19
12:07:19 AM: info No lockfile found.
12:07:20 AM: [1/4] Resolving packages...
12:07:23 AM: [2/4] Fetching packages...
12:07:25 AM: Failed during stage "Install dependencies": dependency_installation script returned non-zero exit code: 1
12:07:25 AM: error [email protected]: The engine "node" is incompatible with this module. Expected version ">=18". Got "16.20.2"
12:07:25 AM: error Found incompatible module.
12:07:25 AM: info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
12:07:25 AM: Error during Yarn install
12:07:25 AM: Failing build: Failed to install dependencies

Steps to reproduce

simply list @netlify/plugin-nextjs in package.json and the yarn install fails

Next Runtime version

4.41.3

Is your issue related to the app directory?

  • Yes, I am using the app directory

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?

None

Your netlify.toml file

[[plugins]]
package = "@netlify/plugin-nextjs"

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.
@gocreating gocreating added the type: bug code to address defects in shipped code label Jan 31, 2024
@firashamila33
Copy link

updates on this ?

@MarcL MarcL added v4 Issues related to the v4 Next.js runtime and removed Ecosystem: Frameworks labels Mar 13, 2024
@MarcL
Copy link
Contributor

MarcL commented Mar 13, 2024

Hey @gocreating and @firashamila33,

From the build logs, it looks like a dependency needs Node 18 and you're using Node 16.

12:07:25 AM: Failed during stage "Install dependencies": dependency_installation script returned non-zero exit code: 1
12:07:25 AM: error [email protected]: The engine "node" is incompatible with this module. Expected version ">=18". Got "16.20.2"
12:07:25 AM: error Found incompatible module.

Can you follow the instructions here to upgrade to Node 18 or 20? That should fix your issue.

https://docs.netlify.com/configure-builds/manage-dependencies/

Thanks!

@MarcL MarcL closed this as completed Mar 13, 2024
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 v4 Issues related to the v4 Next.js runtime
Projects
None yet
Development

No branches or pull requests

3 participants