How do I Properly run NPM Install in Visual Studio Team Services Build Agent - npm

I'm having trouble setting up an NPM task for an automated build in Visual Studio Team Services (previously Visual Studio Online). There are two problems:
Cache locking errors (shown below).
It is painfully slow -- 45+ minutes for a dozen or so packages.
I added the --cache argument but that did not seem to help.
npm install --dev --cache $(Agent.BuildDirectory)\b
The binaries folder seems like the right spot for the cache, but honestly, I'm not sure. Some documentation here:
https://msdn.microsoft.com/Library/vs/alm/Build/scripts/variables#AgentVariables
I appreciate any advice...
Current Config:
Build console output:
Set workingFolder to default: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\1.97.1\tasks\Npm\0.2.7
##[debug]check path : C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\1.97.1\tasks\Npm\0.2.7\task.json
##[debug]set resource file to: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\1.97.1\tasks\Npm\0.2.7\task.json
##[debug]system.culture=en-US
##[debug]check path : C:\Program Files\nodejs\npm.cmd
##[debug]npm=C:\Program Files\nodejs\npm.cmd
##[debug]cwd=C:\a\1\s\com.example.web
##[debug]path exists: C:\a\1\s\com.example.web
##[debug]command=install
##[debug]C:\Program Files\nodejs\npm.cmd arg: install
##[debug]arguments=--dev --cache C:\a\1\b
##[debug]C:\Program Files\nodejs\npm.cmd arg: --dev --cache C:\a\1\b
##[debug]exec tool: C:\Program Files\nodejs\npm.cmd
##[debug]Arguments:
##[debug] install
##[debug] --dev
##[debug] --cache
##[debug] C:\a\1\b
[command]C:\Program Files\nodejs\npm.cmd install --dev --cache C:\a\1\b
npm WARN deprecated graceful-fs#3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs#^4.0.0 as soon as possible.
npm WARN deprecated sf-lint#1.0.2: Use eslint-config-simplifield instead.
npm WARN deprecated lodash#2.4.1: lodash#<3.0.0 is no longer maintained. Upgrade to lodash#^4.0.0.
npm WARN deprecated lodash#0.9.2: Grunt needs your help! See https://github.com/gruntjs/grunt/issues/1403.
npm ERR! addLocal Could not install C:\a\1\s\com.example.web\#shinnn\eslint-config#>=0.0.5 <0.0.6\fixtures
npm WARN deprecated phantomjs#2.1.3: Package renamed to phantomjs-prebuilt. Please update 'phantomjs' package references to 'phantomjs-prebuilt'
npm WARN peerDependencies The peer dependency qunitjs#^1.14.0 included from karma-qunit will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN package.json Dependency 'mocha' exists in both dependencies and devDependencies, using 'mocha#*' from dependencies
npm WARN package.json Dependency 'mocha' exists in both dependencies and devDependencies, using 'mocha#*' from dependencies
npm ERR! addLocal Could not install C:\a\1\s\com.example.web\#shinnn\eslint-config#>=0.0.4 <0.0.5\fixtures
> cson#1.6.2 preinstall C:\a\1\s\com.example.web\node_modules\gulp-uglify\node_modules\uglify-save-license\node_modules\grunt-replace\node_modules\applause\node_modules\cson
> node ./cyclic.js
npm WARN locking Error: EMFILE, open 'C:\a\1\b\_locks\strip-ansi-0bb45da2369f5768.lock.STALE.STALE.STALE'
npm WARN locking at Error (native)
npm WARN locking C:\a\1\b\_locks\strip-ansi-0bb45da2369f5768.lock failed { [Error: EMFILE, open 'C:\a\1\b\_locks\strip-ansi-0bb45da2369f5768.lock.STALE.STALE.STALE']
npm WARN locking errno: -4066,
npm WARN locking code: 'EMFILE',
npm WARN locking path: 'C:\\a\\1\\b\\_locks\\strip-ansi-0bb45da2369f5768.lock.STALE.STALE.STALE' }
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--dev" "--cache" "C:\\a\\1\\b"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
2016-03-30T14:15:17.4509244Z npm ERR! Attempt to unlock C:\a\1\s\com.example.web\node_modules\gulp-imagemin\node_modules\imagemin-pngquant\node_modules\pngquant-bin\node_modules\compare-size\node_modules\ava\node_modules\chalk\node_modules\strip-ansi, which hasn't been locked
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm WARN locking Error: EMFILE, open 'C:\a\1\b\_locks\ansi-styles-cedcc1e1e4774cd0.lock.STALE.STALE.STALE'
npm WARN locking at Error (native)
npm WARN locking C:\a\1\b\_locks\ansi-styles-cedcc1e1e4774cd0.lock failed { [Error: EMFILE, open 'C:\a\1\b\_locks\ansi-styles-cedcc1e1e4774cd0.lock.STALE.STALE.STALE']
npm WARN locking errno: -4066,
npm WARN locking code: 'EMFILE',
npm WARN locking path: 'C:\\a\\1\\b\\_locks\\ansi-styles-cedcc1e1e4774cd0.lock.STALE.STALE.STALE' }
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--dev" "--cache" "C:\\a\\1\\b"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! Attempt to unlock C:\a\1\s\com.example.web\node_modules\gulp-imagemin\node_modules\imagemin-pngquant\node_modules\pngquant-bin\node_modules\compare-size\node_modules\ava\node_modules\chalk\node_modules\ansi-styles, which hasn't been locked
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm WARN locking Error: EMFILE, open 'C:\a\1\b\_locks\has-ansi-819c7cca16ab7ac8.lock.STALE.STALE.STALE'
npm WARN locking at Error (native)
2016-03-30T14:15:17.5709240Z npm WARN locking C:\a\1\b\_locks\has-ansi-819c7cca16ab7ac8.lock failed { [Error: EMFILE, open 'C:\a\1\b\_locks\has-ansi-819c7cca16ab7ac8.lock.STALE.STALE.STALE']

Re-installing NPM solved my issue:
npm install npm -g
Specifically, I added the circled task to my build:

Related

I cant install node modules in react native ,and I get a error message, how can i fix this?

After installing some packages I stumbeled against this error, and I dont know how to fix this:
I hope someone knows how to get this cleaned up, I dont care if I have to install all the packages again.
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command C:\Program Files\nodejs\node.exe C:\Users\muziek\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\muziek\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! > #expo/vector-icons#13.0.0 prepare
npm ERR! > expo-module prepare && npm run generate-lazy && npm run copy-vendor
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN deprecated set-value#0.4.3: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm ERR! npm WARN deprecated mixin-deep#1.3.1: Critical bug fixed in v2.0.1, please upgrade to the latest version.
npm ERR! npm WARN deprecated set-value#2.0.0: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm ERR! npm WARN deprecated kleur#2.0.2: Please upgrade to kleur#3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
npm ERR! npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm ERR! npm WARN deprecated har-validator#5.1.3: this library is no longer supported
npm ERR! npm WARN deprecated request-promise-native#1.0.7: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm ERR! npm WARN deprecated chokidar#2.1.2: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm ERR! npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! npm WARN deprecated w3c-hr-time#1.0.1: Use your platform's native performance.now() and performance.timeOrigin.
npm ERR! npm WARN deprecated source-map-url#0.4.0: See https://github.com/lydell/source-map-url#deprecated
npm ERR! npm WARN deprecated left-pad#1.3.0: use String.prototype.padStart()
npm ERR! 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 ERR! npm WARN deprecated debug#3.2.6: 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 ERR! npm WARN deprecated sane#2.5.2: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm ERR! npm WARN deprecated request#2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! npm WARN deprecated source-map-resolve#0.5.2: See https://github.com/lydell/source-map-resolve#deprecated
npm ERR! npm WARN deprecated uuid#3.3.2: 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 ERR! 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 ERR! npm WARN deprecated core-js#2.6.5: core-js#<3.23.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. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! C:\Users\muziek\AppData\Local\npm-cache\_cacache\tmp\git-clone9p2w60\node_modules\expo-module-scripts\bin\expo-module-prepare:3
npm ERR! set -eo pipefail
npm ERR! ^^^^^^^^
npm ERR!
npm ERR! SyntaxError: Unexpected identifier
npm ERR! at Object.compileFunction (node:vm:352:18)
npm ERR! at wrapSafe (node:internal/modules/cjs/loader:1031:15)
npm ERR! at Module._compile (node:internal/modules/cjs/loader:1065:27)
npm ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
npm ERR! at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
npm ERR! at node:internal/main/run_main_module:17:47
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path C:\Users\muziek\AppData\Local\npm-cache\_cacache\tmp\git-clone9p2w60
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c expo-module prepare && npm run generate-lazy && npm run copy-vendor
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! C:\Users\muziek\AppData\Local\npm-cache\_logs\2023-01-09T08_48_36_983Z-debug-0.log
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\muziek\AppData\Local\npm-cache\_logs\2023-01-09T08_48_13_969Z-debug-0.log
Try deleting the node_modules directory and running npm install again. This will force npm to reinstall all of the dependencies, which might fix the problem.
If that doesn't work, you might want to try deleting the package-lock.json file and running npm install again.
If none of these steps help, you can try running npm install --force. However, using the --force flag can also cause problems if it causes npm to overwrite or delete files that are needed for your project to work correctly. It's generally a good idea to use the --force flag only as a last resort, after other methods of fixing the problem have been tried.
Try this,
run npm cache clean --force
Delete node_modules like $ rm -rf node_modules also delete package-lock.json
Install fresh packages npm install
Start the application npm start
Let us know your feedback.
Thanks

npm install --global windows-build-tools problem

npm WARN deprecated har-validator#5.1.5: this library is no longer supported
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 windows-build-tools#4.0.0: Node.js now includes build tools for Windows. You probably no longer need this tool. See https://github.com/felixrieseberg/windows-build-tools for details.
npm ERR! code 1
npm ERR! path C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node ./dist/index.js
Downloading python-2.7.14.amd64.msi
npm ERR! [============================================>] 100.0% of 20.2 MB (3.51 MB/s)
npm ERR! Downloaded python-2.7.14.amd64.msi. Saved to C:\Users\ABC\.windows-build-tools\python-2.7.14.amd64.msi.
Downloading BuildTools_Full.exe
npm ERR! [============================================>] 100.0% of 3.29 MB (3.29 MB/s)
npm ERR! Downloaded BuildTools_Full.exe. Saved to C:\Users\ABC\.windows-build-tools\BuildTools_Full.exe.
npm ERR!
npm ERR! Starting installation...
npm ERR! Downloading installers failed. Error: TypeError: 'process.env' only accepts a configurable, writable, and enumerable data descriptor
npm ERR! at Function.defineProperty (<anonymous>)
npm ERR! at Object.removePath (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\dist\utils\remove-path.js:11:12)
npm ERR! at Object.install (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\dist\install\index.js:29:19)
npm ERR! at C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\dist\start.js:17:19
npm ERR! at Object.download (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\dist\download.js:35:5)
npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
npm ERR! at async Object.aquireInstallers (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\dist\aquire-installers.js:32:13) {
npm ERR! code: 'ERR_INVALID_OBJECT_DEFINE_PROPERTY'
npm ERR! }
npm ERR! windows-build-tools will now exit.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ABC\AppData\Local\npm-cache\_logs\2023-01-18T06_00_13_950Z-debug-0.log
how to solve it please

issues with installing react native, npm install -g expo-cli gives warnings

I'm trying to install Expo CLI to set up the development environment for React Native but I keep getting this warning when I enter "npm install -g expo-cli" into my terminal:
npm WARN EBADENGINE required: { node: '>=12 <=16' },
npm WARN EBADENGINE current: { node: 'v18.2.0', npm: '8.9.0' }
Previously, trying to install Expo CLI with npm would throw errors like
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/expo-cli
npm ERR! dest /usr/local/lib/node_modules/.expo-cli-dKBr48UN
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/expo-cli' -> '/usr/local/lib/node_modules/.expo-cli-dKBr48UN'
npm ERR! [Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/expo-cli' -> '/usr/local/lib/node_modules/.expo-cli-dKBr48UN'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'rename',
npm ERR! path: '/usr/local/lib/node_modules/expo-cli',
npm ERR! dest: '/usr/local/lib/node_modules/.expo-cli-dKBr48UN'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
Then I tried the NVM solution in this post which asked me to uninstall node and then install NVM so that doing things like writing in my npm directory wouldn't ask for permission, but now I'm unsure what to do.
edit:
I followed this website to change my node version to v14.19.3 but now there are these warnings:
npm WARN deprecated subscriptions-transport-ws#0.9.8: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
npm WARN deprecated graphql-tools#3.0.0: 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
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 svgo#1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
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 querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer 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.
/Users/zoeylee/.nvm/versions/node/v14.19.3/bin/expo -> /Users/zoeylee/.nvm/versions/node/v14.19.3/lib/node_modules/expo-cli/bin/expo.js
/Users/zoeylee/.nvm/versions/node/v14.19.3/bin/expo-cli -> /Users/zoeylee/.nvm/versions/node/v14.19.3/lib/node_modules/expo-cli/bin/expo.js
npm WARN ajv-keywords#3.5.2 requires a peer of ajv#^6.9.1 but none is installed. You must install peer dependencies yourself.
I'm a new user and programmer so any advice/help is appreciated, thanks!
You are using 18.2.0, but the message says it requires >=12 <=16 (greater than 12 and less than 16. Not 18.2.0 or greater.
If it's your package.json with the engines field causing this issue, change it to say 12.0.0 or greater:
"engines": {
"node": ">=12.0.0"
},

Error install "npm install" bootstrap 4 ( build tools )

I setup build tools for study. But i installed nodejs and go to cmd for setup with "npm install", it show me an error. How can i fix this?
Tks.
Error info:
C:\Users\users\Downloads\bootstrap-custom>npm install
iltorb#1.3.10 install C:\Users\micha\Downloads\bootstrap-custom\node_modules\iltorb
detect-libc prebuild-install || node-gyp rebuild
prebuild-install info begin Prebuild-install version 2.5.1
prebuild-install info looking for local prebuild # prebuilds\iltorb-v1.3.10-node-v59-win32-x64.tar.gz
prebuild-install info looking for cached prebuild # C:\Users\users\AppData\Roaming\npm-cache_prebuilds\https-github.com-MayhemYDG-iltorb-releases-download-v1.3.10-iltorb-v1.3.10-node-v59-win32-x64.tar.gz
prebuild-install http request GET https://github.com/MayhemYDG/iltorb/releases/download/v1.3.10/iltorb-v1.3.10-node-v59-win32-x64.tar.gz
prebuild-install http 404 https://github.com/MayhemYDG/iltorb/releases/download/v1.3.10/iltorb-v1.3.10-node-v59-win32-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=9.11.1 runtime=node arch=x64 platform=win32)
C:\Users\users\Downloads\bootstrap-custom\node_modules\iltorb>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Users\micha\AppData\Local\Programs\Python\Python36-32\python.EXE", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:170:21)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\micha\Downloads\bootstrap-custom\node_modules\iltorb
gyp ERR! node -v v9.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN rollback Rolling back readable-stream#2.2.9 failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\users\Downloads\bootstrap-custom\node_modules\fsevents\node_modules'
npm WARN bootstrap#4.1.0 requires a peer of jquery#1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! iltorb#1.3.10 install: detect-libc prebuild-install || node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the iltorb#1.3.10 install 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! C:\Users\users\AppData\Roaming\npm-cache_logs\2018-04-10T11_50_16_425Z-debug.log
At least one of your problems is that your bootstrap package requires jQuery 1.9.1 or above, see the package.json file
"peerDependencies": {
"jquery": "1.9.1 - 3",
"popper.js": "^1.14.0" },
So all you really need to do is install jQuery and re-run npm install on your bootstrap package. So something like this should do it:-
# get back to the directory where your bootstrap package is
cd bootstrap-4.1.0
# install latest version of jQuery
npm i jquery
# re-install the bootstrap package
npm install
(I notice you are on Windows so do the equivalent of the above.) Go through all your packages that are in error or have a warning and make sure that they are installed.

installation of Bower : getting npm ERR

I have node and nodenv installed on my Ubuntu 16.04
I want to install bower
npm install -g bower
I am getting this :
npm WARN deprecated bower#1.8.2: ...psst! Your project can stop
working at any moment because its dependencies can change. Prevent
this by migrating to Yarn:
https://bower.io/blog/2017/how-to-migrate-away-from-bower/
npm ERR! Linux 4.4.0-94-generic
npm ERR! argv "/home/mypc/.nodenv/versions/4.6.0/bin/node" "/home/mypc/.nodenv/versions/4.6.0/bin/npm" "install" "-g"
"bower"
npm ERR! node v4.6.0
npm ERR! npm v2.15.9
npm ERR! shasum check failed for /tmp/npm-4594-c12fe2a2/registry.npmjs.org/bower/-/bower-1.8.2.tgz
npm ERR! Expected: adf53529c8d4af02ef24fb8d5341c1419d33e2f7
npm ERR! Actual: ca90d0b92af2557a3f8e9116ba83b3fc4ad7828
npm ERR! From: https://registry.npmjs.org/bower/-/bower-1.8.2.tgz
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues>
The npm client is unable to verify the downloaded file from the npm registry:
shasum check failed for /tmp/npm-4594-c12fe2a2/registry.npmjs.org/bower/-/bower-1.8.2.tgz
Expected: adf53529c8d4af02ef24fb8d5341c1419d33e2f7
Actual: ca90d0b92af2557a3f8e9116ba83b3fc4ad7828
How to fix?
If you have a corporate proxy in between, make sure it doesn't modify the content of your downloaded files.
If there is no proxy involved, retry the installation.