AWS Elastic Beanstalk fails deployment because of NPM warnings - node.js

My elastic beanstalk deployment fails with this log
2021/03/23 14:42:05.458565 [ERROR] An error occurred during execution of command [config-deploy] - [Use NPM to install dependencies]. Stop running the command. Error: Command /bin/sh -c npm --production install failed with error exit status 1. Stderr:npm WARN deprecated babel-eslint#10.1.0: babel-eslint is now #babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated debug#4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797 )
npm WARN deprecated is-hex#1.1.3: Development of this module has been stopped.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated fsevents#2.1.3: "Please update to latest v2.3 or v2.2"
npm WARN deprecated request#2.16.6: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated debug#4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797 )
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
npm WARN deprecated hawk#0.10.2: This module moved to #hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated hoek#0.7.6: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated cryptiles#0.1.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated boom#0.3.8: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated sntp#0.1.4: This module moved to #hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated json3#3.2.6: Please use the native JSON object instead of JSON 3
npm WARN deprecated node-uuid#1.4.1: Use uuid module instead
This should not cause the platform to fail the deployment.
Is there a way to override the ELB npm install command to add the --logLevel=error flag.
Still feels like a bug with ELB even if its possible to ignore the warnings somehow.

Ended up using a work around by adding a .npmrc file and added the line --logLevel=error

Related

Installing Vue on windows getting depreciatted Error

I'm new to Vue I planned to use vue in my next project just I was trying to setup the environment and I followed the instruction on the offical website, but i got some errors after running npm instal -g #vue/cli I try to search google for solution to the erro to no avail.
I'm trying to iunstall it on windows 10 and i already added the node js to my environment path
Anyone know how to solve this problem and why i get this problem please help me out.
node version: v16.13.1
npm version: 8.3.0
using: powershell
npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/joi#15.1.1: Switch to 'npm install joi'
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated graphql-extensions#0.15.0: The `graphql-extensions` API has been removed from Apollo Server 3. Use the plugin API instead: https://www.apollographql.com/docs/apollo-server/integrations/plugins/
npm WARN deprecated apollo-tracing#0.15.0: The `apollo-tracing` package is no longer part of Apollo Server 3. See https://www.apollographql.com/docs/apollo-server/migration/#tracing for details
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated apollo-cache-control#0.14.0: The functionality provided by the `apollo-cache-control` package is built in to `apollo-server-core` starting with Apollo Server 3.
See https://www.apollographql.com/docs/apollo-server/migration/#cachecontrol for details.
npm WARN deprecated graphql-tools#4.0.8: This package has been deprecated and now it only exports makeExecutableSchema.\nAnd it will no longer receive updates.\nWe recommend you to
migrate to scoped packages such as #graphql-tools/schema, #graphql-tools/utils and etc.\nCheck out https://www.graphql-tools.com to learn what package you should use instead
changed 942 packages, and audited 943 packages in 2m
68 packages are looking for funding
run `npm fund` for details
11 vulnerabilities (4 moderate, 7 high)
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.

Truffle Install (WARN deprecated)

`manuelfiestas#Manuels-MBP node_modules % npm install -g truffle
npm WARN deprecated mkdirp-promise#5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated fsevents#2.1.3: "Please update to latest v2.3 or v2.2"
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated circular-json#0.5.9: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated debug#4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated remotedev-serialize#0.1.9: Package moved to #redux-devtools/serialize.
npm WARN deprecated redux-devtools-instrument#1.10.0: Package moved to #redux-devtools/instrument.
npm WARN deprecated redux-devtools-core#0.2.1: Package moved to #redux-devtools/app.
npm WARN deprecated ethereumjs-tx#2.1.2: New package name format for new versions: #ethereumjs/tx. Please update.
npm WARN deprecated mkdirp#0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated multicodec#0.5.7: stable api reached
npm WARN deprecated node-pre-gyp#0.11.0: Please upgrade to #mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the #mapbox scoped package will recieve updates in the future
npm WARN deprecated axios#0.20.0: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated ethereumjs-common#1.5.2: New package name format for new versions: #ethereumjs/common. Please update.
npm WARN deprecated core-js#2.6.12: core-js#<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
added 1713 packages, and audited 1714 packages in 1m
96 packages are looking for funding
run npm fund for details
53 vulnerabilities (16 low, 8 moderate, 29 high)
To address all issues, run:
npm audit fix
Run npm audit for details.
manuelfiestas#Manuels-MBP node_modules %`
delete all files you have in your filesystem from old failed installations and try again
The answer below stands for a manual installation, but there is a much simpler way : the automatic install.
Open Powershell as admin and run npm install -g windows-build-tools
The install takes time but it worked.

Unable to install Expo CLI. (NPM WARN Deprecated)

So, I'm running the following command to install it: I'm using MACOS
npm install -g expo-cli
And this is what I get:
npm WARN deprecated u/hapi/joi#17.1.1: Switch to 'npm install joi'
npm WARN deprecated u/hapi/address#4.1.0: Moved to 'npm install u/sideway/address'
npm WARN deprecated u/hapi/formula#2.0.0: Moved to 'npm install u/sideway/formula'
npm WARN deprecated u/hapi/pinpoint#2.0.0: Moved to 'npm install u/sideway/pinpoint'
npm WARN deprecated core-js#2.6.12: core-js#<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated joi#11.4.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated topo#2.0.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated hoek#4.2.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
/Users/lachitbaruah/.npm-global/bin/expo-cli -> /Users/lachitbaruah/.npm-global/lib/node_modules/expo-cli/bin/expo.js
/Users/lachitbaruah/.npm-global/bin/expo -> /Users/lachitbaruah/.npm-global/lib/node_modules/expo-cli/bin/expo.js
npm WARN u/pmmmwh/react-refresh-webpack-plugin#0.3.3 requires a peer of react-refresh#^0.8.2 but none is installed. You must install peer dependencies yourself.
expo-cli#4.4.4
updated 14 packages in 102.228s
I have tried almost everything!! But I want the solution for this particular thing.
I found a fix that don't require using yarn or enabling an unsafe flag as of today (12 Mar 2022), and it's all because of this issue: https://github.com/npm/cli/issues/3472
Basically npm can't fix the dependencies (v. 7 or 8), simply run npm install -g npm#6 and continue with the installation process.
On an editorial note, it's pretty insane that a year old bug carried over into 2 majors prevents the installation of something as popular as React Native. I really hope this answer will help people like me who try to get started because I almost abandoned myself.
Try sudo npm install expo-cli -g --unsafe-perm
Run these two commands
sudo npm install npm#latest -g
sudo npm install -g expo-cli

Number of warnings on node modules, can these be addressed in the latest version of jhipster?

Number of warnings on node modules, can these be addressed in the latest version of jhipster?
npm WARN deprecated #types/jest-diff#24.3.0: This is a stub types definition. jest-diff provides its own type definitions, so you do not need this installed.
npm WARN deprecated swagger-ui#2.2.10: No longer maintained, please upgrade to swagger-ui#3.
npm WARN deprecated core-js#1.2.7: core-js#<2.6.5 is no longer maintained. Please, upgrade to core-js#3 or at least to actual version of core-js#2.
npm WARN deprecated cross-spawn-async#2.2.5: cross-spawn no longer requires a build toolchain, use it instead
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.

npm install complains 'node' is not recognized as an internal or external command while node is in the path

I have am doing Jenkins build now, but at some point of doing "npm install" I got a error message saying "'node' is not recognized as an internal or external command, operable program or batch file." However, I do have node in my path and I have verify that but doing "where node" before npm install.
Both "where node" and "npm install" are located in the same Execute Windows batch command section of my Jenkins job.
I have read some posts. Sometimes this error is encountered for not handling the spaces inside the path correct. I do not have space in my path.
I also do not have convenient access to the machine for the build environment. I can only try Jenkins' Execute Windows batch command.
below is my build log inlcuding the error message.
npm install
14:48:56 npm WARN deprecated ng2-bootstrap#1.6.3: ng2-bootstrap is renamed to ngx-bootstrap, please do npm i ngx-bootstrap -S
14:48:57 npm WARN deprecated hapi#13.5.3: This version is no longer maintained. Please upgrade to the latest version of the framework.
14:48:58 npm WARN deprecated gulp-util#3.0.7: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
14:48:59 npm WARN deprecated joi#8.1.1: This version is no longer maintained. Please upgrade to the latest version.
14:48:59 npm WARN deprecated joi#10.6.0: This version is no longer maintained. Please upgrade to the latest version.
14:48:59 npm WARN deprecated boom#3.2.2: This version is no longer maintained. Please upgrade to the latest version.
14:48:59 npm WARN deprecated joi#8.4.2: This version is no longer maintained. Please upgrade to the latest version.
14:48:59 npm WARN deprecated call#3.0.4: This version is no longer maintained. Please upgrade to the latest version.
14:48:59 npm WARN deprecated kilt#2.0.2: This module is no longer maintained.
14:48:59 npm WARN deprecated hoek#3.0.4: This version is no longer maintained. Please upgrade to the latest version.
14:48:59 npm WARN deprecated peekaboo#2.0.2: This module is no longer maintained.
14:48:59 npm WARN deprecated statehood#4.1.0: This version is no longer maintained. Please upgrade to the latest version.
14:48:59 npm WARN deprecated subtext#4.4.1: This version is no longer maintained. Please upgrade to the latest version.
14:48:59 npm WARN deprecated fast-safe-stringify#1.0.9: use 1.1.0+ see https://github.com/davidmarkclements/fast-safe-stringify/issues/4
14:48:59 npm WARN deprecated browserslist#1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
14:49:00 npm WARN deprecated boom#4.3.1: This version is no longer maintained. Please upgrade to the latest version.
14:49:00 npm WARN deprecated joi#9.2.0: This version is no longer maintained. Please upgrade to the latest version.
14:49:05 npm WARN deprecated boom#3.2.0: This version is no longer maintained. Please upgrade to the latest version.
14:49:05 npm WARN deprecated call#3.0.2: This version is no longer maintained. Please upgrade to the latest version.
14:49:05 npm WARN deprecated joi#8.1.0: This version is no longer maintained. Please upgrade to the latest version.
14:49:05 npm WARN deprecated kilt#2.0.1: This module is no longer maintained.
14:49:05 npm WARN deprecated peekaboo#2.0.1: This module is no longer maintained.
14:49:05 npm WARN deprecated statehood#4.0.1: This version is no longer maintained. Please upgrade to the latest version.
14:49:05 npm WARN deprecated subtext#4.0.3: This version is no longer maintained. Please upgrade to the latest version.
14:49:05 npm WARN deprecated wreck#7.2.1: This version is no longer maintained. Please upgrade to the latest version.
14:55:08
14:55:08 > node-sass#4.5.3 install F:\JENKINS-SLAVE\workspace\some_appcode\jenkins_job_code\app_folder\node_modules\node-sass
14:55:08 > node scripts/install.js
14:55:08
14:55:08 'node' is not recognized as an internal or external command,
14:55:08 operable program or batch file.
Add nodejs new system variable to your PC under Control Panel -> System -> Advanced System Settings
;C:\Program Files\nodejs\
After that, re-run command:
npm
The actual solution was to clear the cache of Jenkins' VM and it will work. It was a cache issue of Jenkins.

Resources