Draft-js: npm install fails

Created on 14 Apr 2017  路  10Comments  路  Source: facebook/draft-js

[20:44:08] 'check-dependencies' errored after 5.32 s
[20:44:08] Error in plugin 'check-dependencies'
Message:
npm broke
[20:44:08] 'default' errored after 5.33 s
[20:44:08] Error in plugin 'run-sequence(check-dependencies)'
npm-debug.log.txt

Most helpful comment

Edited my local /fbjs-scripts/gulp/check-dependencies.js L38 to

  • if (code !== 0 && code !== 1) {

and changed package.json

  • "devEngines": {
    "node": "4.x || 6.x || 7.x",
    "npm": "2.x || 3.x || 4.x"
    },

was able to run the package.json scripts

Was unable to run the webside folder project in Windows 10, "npm start" errored out. Got it working on
the Windows 10 Bash Shell Linex with

All 10 comments

Ran into same problem here.

@invegat You can check this [#914]. Basically, it is node/npm version problem.

Edited my local /fbjs-scripts/gulp/check-dependencies.js L38 to

  • if (code !== 0 && code !== 1) {

and changed package.json

  • "devEngines": {
    "node": "4.x || 6.x || 7.x",
    "npm": "2.x || 3.x || 4.x"
    },

was able to run the package.json scripts

Was unable to run the webside folder project in Windows 10, "npm start" errored out. Got it working on
the Windows 10 Bash Shell Linex with

cc @zpao can we increase node engine to 7.x ?

My general feeling is that we should ensure we support building with LTS supported versions. If it doesn't work with LTS versions (eg 7.x, 8.x prior to last week), then we shouldn't go out of our way to support it.

The other bit about code checking - that was fixed in a newer version of fbjs-scripts, along with some other things. So I recommend updating that as well. There's an immutable-related change. Not sure if it affects Draft, but should make sure everything is working post-update.

tldr; sure, and add 8 as well. Also, update fbjs-scripts (read that changelog)

Hi @zpao ,

I want to contribute to the project, however, I'm still having issues with the install process :(

鈿★笍 davo@MBP-Davo draft-js: gulp
[10:59:21] Using gulpfile /Applications/MAMP/htdocs/draft-js/gulpfile.js
[10:59:21] Starting 'default'...
[10:59:21] Starting 'check-dependencies'...
[10:59:21] Starting '<anonymous>'...
[10:59:21] '<anonymous>' errored after 28 ms
[10:59:21] Error: spawn yarn ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
[10:59:21] 'check-dependencies' errored after 31 ms
[10:59:21] 'default' errored after 33 ms

Engines

鈿★笍 davo@MBP-Davo draft-js: node -v
v10.15.3
鈿★笍 davo@MBP-Davo draft-js: npm -v
6.12.1

Any help would be appreciated 馃憤

I can't repro on node 10.16.3 and yarn 1.12.1. Try using yarn. The repo doesn't even have a package-lock.json (I personally only use yarn for draft-js).

Thanks @mrkev that did the trick. I was able to build and submit a pull request to fix another issue :)

Same issue. Used Yarn and that seemed to work.

I can't repro on node 10.16.3 and yarn 1.12.1. Try using yarn. The repo doesn't even have a package-lock.json (I personally only use yarn for draft-js).

Thanks bro!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

B-Reif picture B-Reif  路  3Comments

jackmatrix picture jackmatrix  路  3Comments

ufo22940268 picture ufo22940268  路  3Comments

steviesama picture steviesama  路  3Comments

abeq picture abeq  路  3Comments