Clay: Installation issue with node v10.13.0 and npm v6.4.1

Created on 6 Nov 2018  路  1Comment  路  Source: liferay/clay

When cloning the repo and trying to execute npm run lerna an error is thrown

$ npm run lerna 

> @ lerna /Users/jc/Documents/src/clay
> lerna bootstrap -- --no-optional --no-package-lock

lerna notice cli v3.4.3
lerna info bootstrap root only
yarn install v1.12.1
[1/4] 馃攳  Resolving packages...
[2/4] 馃殮  Fetching packages...
error [email protected]: The engine "node" is incompatible with this module. Expected version ">=4 <=9". Got "10.13.0"
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
lerna ERR! yarn install --mutex network:42424 --non-interactive --no-optional --no-package-lock exited 1 in 'clay'
lerna ERR! yarn install --mutex network:42424 --non-interactive --no-optional --no-package-lock exited 1 in 'clay'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ lerna: `lerna bootstrap -- --no-optional --no-package-lock`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ lerna script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/jc/.npm/_logs/2018-11-06T12_33_38_591Z-debug.log

Note that node v10.13.0 (and npm v6.4.1) is the current LTS release at the time of writing this issue.

Deleting the yarn.lock file and re executing npm run lerna fixes this error though.

Most helpful comment

Looks like this was an issue from upath. They weren't supporting node 10 but they did fix it here, https://github.com/anodynos/upath/pull/15. One way to ignore this is to run yarn --ignore-engines https://github.com/facebook/create-react-app/issues/4367#issuecomment-384667501.

After upgrading dependencies, a handful of snapshots failed due to line breaks in jest. Turns out, that issue is coming from js-beautify from metal-jest-serializer. I updated all our dependencies and then manually used the older version of js-beautify, and that seemed to fix the issue. I am going to look at our serializer package and see if I can make the fix in there first though.

I'll send a follow up on what solution I decide on.

>All comments

Looks like this was an issue from upath. They weren't supporting node 10 but they did fix it here, https://github.com/anodynos/upath/pull/15. One way to ignore this is to run yarn --ignore-engines https://github.com/facebook/create-react-app/issues/4367#issuecomment-384667501.

After upgrading dependencies, a handful of snapshots failed due to line breaks in jest. Turns out, that issue is coming from js-beautify from metal-jest-serializer. I updated all our dependencies and then manually used the older version of js-beautify, and that seemed to fix the issue. I am going to look at our serializer package and see if I can make the fix in there first though.

I'll send a follow up on what solution I decide on.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bicienzu picture bicienzu  路  3Comments

brunofarache picture brunofarache  路  5Comments

drakonux picture drakonux  路  4Comments

joseigor picture joseigor  路  5Comments

bryceosterhaus picture bryceosterhaus  路  5Comments