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

Attempting to deploy to Netlify results in The engine node is incompatible error (Expected ^v14.0.0. , Got 16.20.1) #2113

Closed
zyrif opened this issue Jul 18, 2023 · 4 comments
Labels

Comments

@zyrif
Copy link

zyrif commented Jul 18, 2023

Browser: N/A

OS: Netlify Ubuntu Focal 20.04 - Node v16.20.1, npm v8.19.4 - Yarn v1.22.19

Clappr Version: 0.4.27

I'm facing this issue in Netlify where I'm hosting my project. It builds fine in my local environment (Win 10, Node 16.14.0, Yarn 3.4.1).

The project has the following Clappr related dependencies:

"@clappr/core": "^0.4.27",
"@clappr/hlsjs-playback": "^1.1.0",
"@clappr/plugins": "^0.5.0",
"dash-shaka-playback": "^3.1.0",

Deploy Log

4:43:22 PM: Failed during stage 'Install dependencies': dependency_installation script returned non-zero exit code: 1
4:42:49 PM: build-image version: 310cc3c813338a2ca47a215a1ab6889dc6ff6cb7 (focal)
4:42:49 PM: buildbot version: d59e91ad7b9655bc2253d9308f8d23584a0c6ed8
4:42:49 PM: Fetching cached dependencies
4:42:49 PM: Starting to download cache of 485.6MB
4:42:54 PM: Finished downloading cache in 5.177s
4:42:54 PM: Starting to extract cache
4:42:59 PM: Finished extracting cache in 4.028s
4:42:59 PM: Finished fetching cache in 9.292s
4:42:59 PM: Starting to prepare the repo for build
4:42:59 PM: Preparing Git Reference refs/heads/master
4:43:01 PM: Starting to install dependencies
4:43:01 PM: Python version set to 3.8
4:43:01 PM: Attempting Ruby version 2.7.2, read from environment
4:43:02 PM: Using Ruby version 2.7.2
4:43:02 PM: Started restoring cached go cache
4:43:02 PM: Finished restoring cached go cache
4:43:02 PM: go version go1.19.11 linux/amd64
4:43:03 PM: Using PHP version 8.0
4:43:04 PM: Started restoring cached Node.js version
4:43:05 PM: Finished restoring cached Node.js version
4:43:05 PM: v16.20.1 is already installed.
4:43:05 PM: Now using node v16.20.1 (npm v8.19.4)
4:43:05 PM: Enabling Node.js Corepack
4:43:06 PM: Started restoring cached build plugins
4:43:06 PM: Finished restoring cached build plugins
4:43:06 PM: Started restoring cached corepack dependencies
4:43:06 PM: Finished restoring cached corepack dependencies
4:43:06 PM: Started restoring cached yarn cache
4:43:08 PM: Finished restoring cached yarn cache
4:43:09 PM: No yarn workspaces detected
4:43:09 PM: Started restoring cached node modules
4:43:09 PM: Finished restoring cached node modules
4:43:09 PM: Installing npm packages using Yarn version 1.22.19
4:43:09 PM: yarn install v1.22.19
4:43:09 PM: [1/4] Resolving packages...
4:43:21 PM: [2/4] Fetching packages...
4:43:22 PM: error @clappr/core@0.4.27: The engine node is incompatible with this module. Expected version ^v14.0.0. Got 16.20.1
4:43:22 PM: error Found incompatible module.
4:43:22 PM: info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
4:43:22 PM: Error during Yarn install
4:43:22 PM: Build was terminated: dependency_installation script returned non-zero exit code: 1
4:43:22 PM: Failing build: Failed to install dependencies
@zyrif zyrif added the bug label Jul 18, 2023
@not-soo-cool
Copy link

Hey @zyrif , is your code working as per your expectations ?
The error you're receiving on your end might be because of the version mismatching required to install the clappr/core.
In order to fix it, you can try "yarn dlx command" to avoid installing the dependencies globally and to run specific commands from the package -
yarn dlx package-name command
You can run this command in your terminal and can let me know if this fixes your issue.

@zyrif
Copy link
Author

zyrif commented Jul 21, 2023

@not-soo-cool Hi, the issue I'm facing is happening when deploying to Netlify, it's working fine in my local environment. Netlify doesn't give users option to run commands in the terminal, afaik we can only edit the build command. The error happens when installing dependencies, before the build command gets a chance to execute.

@zyrif
Copy link
Author

zyrif commented Jul 24, 2023

Found a workaround - manually setting the yarn version to 3.0+ using the packageManager property in package.json seems to fix the dependency installation error.

However, since this is a workaround and not a fix, I'm keeping this issue open.

@leaofelipe
Copy link
Member

Hi Guys. I think this PR will solve the problem 👍🏻
@felipecesr @zyrif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants