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

[now-build-utils] Ignore engines for yarn run #3341

Merged
merged 2 commits into from
Nov 21, 2019
Merged

Conversation

styfle
Copy link
Member

@styfle styfle commented Nov 21, 2019

Fixes a confusing error message.

Click to view error message
> Ready! Available at http://localhost:3000
> Building @now/node:index.js
Installing dependencies...
Running "yarn run now-build"
yarn run v1.17.3
error @: The engine "node" is incompatible with this module. Expected version "10.x". Got "12.13.1"
error Commands cannot run with an incompatible environment.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Exited with 1
    at ChildProcess. (/Users/styfle/Library/Caches/co.zeit.now/dev/builders/node_modules/@now/node/dist/index.js:78518:24)
    at ChildProcess.emit (events.js:210:5)
    at ChildProcess.EventEmitter.emit (domain.js:475:20)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
  message: 'Exited with 1'
}

The --ignore-engines flag was added to yarn install many months ago in PR 463 but not yarn run.

This PR adds the flag to yarn run.

This is useful in now dev when the user might have a different Node version installed than what is specified by engines in package.json.

@kodiakhq kodiakhq bot merged commit 7892f88 into master Nov 21, 2019
@kodiakhq kodiakhq bot deleted the yarn-run-ignore-engines branch November 21, 2019 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants