Dear,
I tried to update my instance that I updated last month with success.
After a pull,
$ npm installnpm ERR! code EBADPLATFORMnpm ERR! notsup Unsupported platform for fsev...@2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})npm ERR! notsup Valid OS: darwinnpm ERR! notsup Valid Arch: anynpm ERR! notsup Actual OS: linuxnpm ERR! notsup Actual Arch: x64npm 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 --forcenpm 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.285sfound 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 --forcenpm 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.3added 25 packages from 49 contributors, removed 5 packages, updated 6 packages and audited 2028660 packages in 30.866sfound 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 startsh: 1: react-app-rewired: not foundnpm ERR! file shnpm ERR! code ELIFECYCLEnpm ERR! errno ENOENTnpm ERR! syscall spawnnpm ERR! ep...@50.0.1 start: `react-app-rewired start`npm ERR! spawn ENOENTnpm 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.log0 info it worked if it ends with ok1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]2 info using n...@6.4.13 info using no...@v10.15.34 verbose run-script [ 'prestart', 'start', 'poststart' ]5 info lifecycle ep...@50.0.1~prestart: ep...@50.0.16 info lifecycle ep...@50.0.1~start: ep...@50.0.17 verbose lifecycle ep...@50.0.1~start: unsafe-perm in lifecycle true8 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/games9 verbose lifecycle ep...@50.0.1~start: CWD: /var/www/public/eg-react_test/frontend10 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 script12 verbose stack Error: ep...@50.0.1 start: `react-app-rewired start`12 verbose stack spawn ENOENT12 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.114 verbose cwd /var/www/public/eg-react_test/frontend15 verbose Linux 4.17.0-0.bpo.3-amd6416 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"17 verbose node v10.15.318 verbose npm v6.4.119 error file sh20 error code ELIFECYCLE21 error errno ENOENT22 error syscall spawn23 error ep...@50.0.1 start: `react-app-rewired start`23 error spawn ENOENT24 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 startinternal/modules/cjs/loader.js:584throw 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 ELIFECYCLEnpm ERR! errno 1npm ERR! ep...@50.0.1 start: `react-app-rewired start`npm ERR! Exit status 1npm 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,
AubinAfter 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 environmentsnpm WARN deprecated text-e...@0.7.0: no longer maintainednpm WARN deprecated clipbo...@0.3.6: Please migrate to https://github.com/lgarron/clipboard-polyfillnpm 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 issuenpm 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 issuenpm 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.