Error while updating the instance

377 views
Skip to first unread message

aubin thomas

unread,
Aug 28, 2019, 10:35:54 AM8/28/19
to WashU Epigenome Browser
Dear,

I tried to update my instance that I updated last month with success.

After a pull, 


$ npm install
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for fsev...@2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! notsup Valid OS:    darwin
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   linux
npm ERR! notsup Actual Arch: x64
npm ERR! A complete log of this run can be found in:
npm ERR!     /data-ssd/www/.npm/_logs/2019-08-28T12_38_50_470Z-debug.log



$ npm install --force
npm WARN using --force I sure hope you know what you are doing.
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it!
npm WARN acor...@5.0.1 requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN html-webp...@2.30.1 requires a peer of webpack@1 || ^2 || ^2.1.0-beta || ^2.2.0-rc || ^3 but none is installed. You must install peer dependencies yourself.
npm WARN jest-imag...@1.0.1 requires a peer of jest@^20.0.0 || ^21.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev...@1.12.2 requires a peer of webpack@^1.0.0 || ^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
added 1 package from 4 contributors and audited 926336 packages in 19.285s
found 13 vulnerabilities (4 low, 4 moderate, 4 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details



So I installed missing packages :


$ npm install --save-dev acorn@^6.0.0 html-webp...@2.30.1 webpack@^3 jest-image-snapshot jest@^20.0.0 webpack-dev-middleware webpack@^3.0.0 webpack@^4.4.0  --force
npm WARN using --force I sure hope you know what you are doing.
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it!
npm WARN html-webp...@2.30.1 requires a peer of webpack@1 || ^2 || ^2.1.0-beta || ^2.2.0-rc || ^3 but none is installed. You must install peer dependencies yourself.

+ webpack-dev...@3.7.0
+ html-webp...@2.30.1
+ ac...@6.3.0
+ jest-imag...@1.0.1
+ je...@20.0.4
+ web...@3.12.0
+ web...@3.12.0
+ web...@4.39.3
added 25 packages from 49 contributors, removed 5 packages, updated 6 packages and audited 2028660 packages in 30.866s
found 41 vulnerabilities (30 low, 5 moderate, 5 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details



And I have this issue:
$ npm start

> ep...@50.0.1 start /var/www/public/eg-react_test/frontend
> react-app-rewired start

sh: 1: react-app-rewired: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! ep...@50.0.1 start: `react-app-rewired start`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the ep...@50.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /data-ssd/www/.npm/_logs/2019-08-28T12_47_21_530Z-debug.log


The log file is :
$ cat /data-ssd/www/.npm/_logs/2019-08-28T12_47_21_530Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using n...@6.4.1
3 info using no...@v10.15.3
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle ep...@50.0.1~prestart: ep...@50.0.1
6 info lifecycle ep...@50.0.1~start: ep...@50.0.1
7 verbose lifecycle ep...@50.0.1~start: unsafe-perm in lifecycle true
8 verbose lifecycle ep...@50.0.1~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/www/public/eg-react_test/frontend/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
9 verbose lifecycle ep...@50.0.1~start: CWD: /var/www/public/eg-react_test/frontend
10 silly lifecycle ep...@50.0.1~start: Args: [ '-c', 'react-app-rewired start' ]
11 info lifecycle ep...@50.0.1~start: Failed to exec start script
12 verbose stack Error: ep...@50.0.1 start: `react-app-rewired start`
12 verbose stack spawn ENOENT
12 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack     at ChildProcess.emit (events.js:189:13)
12 verbose stack     at maybeClose (internal/child_process.js:970:16)
12 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
13 verbose pkgid ep...@50.0.1
14 verbose cwd /var/www/public/eg-react_test/frontend
15 verbose Linux 4.17.0-0.bpo.3-amd64
16 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
17 verbose node v10.15.3
18 verbose npm  v6.4.1
19 error file sh
20 error code ELIFECYCLE
21 error errno ENOENT
22 error syscall spawn
23 error ep...@50.0.1 start: `react-app-rewired start`
23 error spawn ENOENT
24 error Failed at the ep...@50.0.1 start script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]



I tried to install react-app-rewired:
$ npm install react-app-rewired --save-dev

but then I have again an issue with the same output in the lof file:

$ npm start

> ep...@50.0.1 start /var/www/public/eg-react_test/frontend
> react-app-rewired start

internal/modules/cjs/loader.js:584
    throw err;
    ^

Error: Cannot find module 'react-scripts/package.json'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.resolve (internal/modules/cjs/helpers.js:30:19)
    at Object.<anonymous> (/var/www/public/eg-react_test/frontend/node_modules/react-app-rewired/scripts/utils/paths.js:27:11)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ep...@50.0.1 start: `react-app-rewired start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ep...@50.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /data-ssd/www/.npm/_logs/2019-08-28T14_22_32_353Z-debug.log




Do you have any idea how to deal with these errors? I have no real expertise in node.js.


Thanks in advance,


Aubin

Daofeng Li

unread,
Aug 28, 2019, 10:39:40 AM8/28/19
to WashU Epigenome Browser
Hi Aubin,

We recently updated to use webpack 4 and typescript 3.4.
can you git a `git pull`, then delete the `node_modules` folder, retry `npm install` please

aubin thomas

unread,
Aug 28, 2019, 10:53:53 AM8/28/19
to WashU Epigenome Browser
To be sure, I did a fresh new git clone,

then a rm -rf frontend/node_modules

then I typed:

npm install --save-dev acorn@^6.0.0 html-webp...@2.30.1 jest-image-snapshot jest@^20.0.0 webpack-dev-middleware webpack@^4.4.0 typescript@3.4 --force

At the end I have :

npm WARN html-webp...@2.30.1 requires a peer of webpack@1 || ^2 || ^2.1.0-beta || ^2.2.0-rc || ^3 but none is installed. You must install peer dependencies yourself.

+ jest-imag...@1.0.1
+ je...@20.0.4
+ html-webp...@2.30.1
+ webpack-dev...@3.7.0
+ ac...@6.3.0
+ web...@4.39.3
+ types...@3.4.5
added 3916 packages from 2138 contributors and audited 2028660 packages in 50.687s
found 41 vulnerabilities (30 low, 5 moderate, 5 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details





and when I start the application:

$ npm start

> react-app-rewired start


There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.

The react-scripts package provided by Create React App requires a dependency:

  "jest": "24.7.1"

Don't try to install it manually: your package manager does it automatically.
However, a different version of jest was detected higher up in the tree:


Manually installing incompatible versions is known to cause hard-to-debug issues.

If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That will permanently disable this message but you might encounter other issues.

To fix the dependency tree, try following the steps below in the exact order:

  1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
  2. Delete node_modules in your project folder.
  3. Remove "jest" from dependencies and/or devDependencies in the package.json file in your project folder.
  4. Run npm install or yarn, depending on the package manager you use.

In most cases, this should be enough to fix the problem.
If this has not helped, there are a few other things you can try:

  5. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
     This may help because npm has known issues with package hoisting which may get resolved in future versions.

  6. Check if /data-ssd/www/intra-washu.igh.cnrs.fr/public/eg-react_test2/eg-react/frontend/node_modules/jest is outside your project directory.
     For example, you might have accidentally installed something in your home folder.

  7. Try running npm ls jest in your project folder.
     This will tell you which other package (apart from the expected react-scripts) installed jest.

If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That would permanently disable this preflight check in case you want to proceed anyway.

P.S. We know this message is long but please read the steps above :-) We hope you find them helpful!

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ep...@50.0.1 start: `react-app-rewired start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ep...@50.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

Daofeng Li

unread,
Aug 28, 2019, 11:06:21 AM8/28/19
to WashU Epigenome Browser
i see
is there a reason you run this command 'npm install --save-dev acorn@^6.0.0 html-webp...@2.30.1 jest-image-snapshot jest@^20.0.0 webpack-dev-middleware webpack@^4.4.0 typescript@3.4 --force'?

under the frontend folder, can you try

rm -rf node_modules
npm install

aubin thomas

unread,
Aug 29, 2019, 3:35:37 AM8/29/19
to WashU Epigenome Browser
After a rm of node_modules, 

$ npm install

npm WARN deprecated @types/query-...@6.3.0: This is a stub types definition. query-string provides its own type definitions, so you do not need this installed.
npm WARN deprecated code-...@4.0.1: Use codemirror instead, it now supports CommonJS environments
npm WARN deprecated text-e...@0.7.0: no longer maintained
npm WARN deprecated clipbo...@0.3.6: Please migrate to https://github.com/lgarron/clipboard-polyfill
npm WARN deprecated nom...@1.8.1: Package no longer supported. Contact sup...@npmjs.com for more info.
npm WARN deprecated coffee...@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated mini...@0.4.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated browse...@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated cor...@1.2.7: core-js@<2.6.8 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
npm WARN deprecated fla...@1.0.2: I wrote this module a very long time ago; you should use something else.
npm WARN deprecated browse...@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated left...@1.3.0: use String.prototype.padStart()
npm WARN deprecated coffee...@1.6.2: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated mini...@0.2.9: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated grace...@1.1.14: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN @typescript-eslint/eslint...@1.13.0 requires a peer of eslint@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @typescript-eslint/par...@1.13.0 requires a peer of eslint@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsev...@1.2.9 (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsev...@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsev...@1.2.9 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsev...@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsev...@1.2.9 (node_modules/babel-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsev...@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for fsev...@2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! notsup Valid OS:    darwin
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   linux
npm ERR! notsup Actual Arch: x64




so I use --force option : 

$ npm install --force

npm WARN using --force I sure hope you know what you are doing.
npm WARN deprecated @types/query-...@6.3.0: This is a stub types definition. query-string provides its own type definitions, so you do not need this installed.
npm WARN deprecated code-...@4.0.1: Use codemirror instead, it now supports CommonJS environments
npm WARN deprecated text-e...@0.7.0: no longer maintained
npm WARN deprecated clipbo...@0.3.6: Please migrate to https://github.com/lgarron/clipboard-polyfill
npm WARN deprecated nom...@1.8.1: Package no longer supported. Contact sup...@npmjs.com for more info.
npm WARN deprecated mini...@0.4.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated coffee...@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated cor...@1.2.7: core-js@<2.6.8 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
npm WARN deprecated browse...@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated fla...@1.0.2: I wrote this module a very long time ago; you should use something else.
npm WARN deprecated browse...@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated left...@1.3.0: use String.prototype.padStart()
npm WARN deprecated coffee...@1.6.2: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated mini...@0.2.9: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated grace...@1.1.14: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js

> node install


> node install


> node install

npm WARN html-webp...@2.30.1 requires a peer of webpack@1 || ^2 || ^2.1.0-beta || ^2.2.0-rc || ^3 but none is installed. You must install peer dependencies yourself.
npm WARN @typescript-eslint/par...@1.13.0 requires a peer of eslint@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @typescript-eslint/eslint...@1.13.0 requires a peer of eslint@^5.0.0 but none is installed. You must install peer dependencies yourself.

added 202 packages from 29 contributors, moved 2 packages and audited 2036255 packages in 29.968s
found 38 vulnerabilities (30 low, 4 moderate, 4 high)
  run `npm audit fix` to fix them, or `npm audit` for details



So I used the command to install the package that are noted to be installed by myself




If I'm doing  a npm start:

$ npm start

> react-app-rewired start

sh: 1: react-app-rewired: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! ep...@50.0.1 start: `react-app-rewired start`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the ep...@50.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

Daofeng Li

unread,
Aug 29, 2019, 12:16:30 PM8/29/19
to WashU Epigenome Browser
looks like `react-app-rewired` in not installed.
can you try npm install react-app-rewired
or sudo npm install -g react-app-rewired

sorry for the trouble.

On Thursday, August 29, 2019 at 2:35:37 AM UTC-5, aubin thomas wrote:
After a rm of node_modules, 

$ npm install

npm WARN deprecated @types/query-...@6.3.0: This is a stub types definition. query-string provides its own type definitions, so you do not need this installed.
npm WARN deprecated code-...@4.0.1: Use codemirror instead, it now supports CommonJS environments
npm WARN deprecated text-e...@0.7.0: no longer maintained
npm WARN deprecated clipbo...@0.3.6: Please migrate to https://github.com/lgarron/clipboard-polyfill
npm WARN deprecated nom...@1.8.1: Package no longer supported. Contact sup...@npmjs.com for more info.
npm WARN deprecated coffee...@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated mini...@0.4.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated browse...@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated cor...@1.2.7: core-js@<2.6.8 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
npm WARN deprecated fla...@1.0.2: I wrote this module a very long time ago; you should use something else.
npm WARN deprecated browse...@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated left...@1.3.0: use String.prototype.padStart()
npm WARN deprecated coffee...@1.6.2: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated mini...@0.2.9: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated grace...@1.1.14: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN @typescript-eslint/eslint-plu...@1.13.0 requires a peer of eslint@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @typescript-eslint/parser@1.13.0 requires a peer of eslint@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @typescript-eslint/parser@1.13.0 requires a peer of eslint@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @typescript-eslint/eslint-plu...@1.13.0 requires a peer of eslint@^5.0.0 but none is installed. You must install peer dependencies yourself.

aubin thomas

unread,
Aug 30, 2019, 3:32:29 AM8/30/19
to WashU Epigenome Browser
Thank you !

I did it with my user (without sudo access) and it did not work.
I asked to the admin to install with npm and it works now!

Thanks again!

aubin

Daofeng Li

unread,
Aug 30, 2019, 10:26:22 AM8/30/19
to WashU Epigenome Browser
I see, thanks for the update Aubin.
I didn't realize that package need admin access :(
Reply all
Reply to author
Forward
0 new messages