Facing issues with npm i and installing npm packages - node.js

Hi I'm trying to install NPM package via NPM I, however I constantly get this error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: cypress-image-snapshot#4.0.1
npm ERR! Found: cypress#9.6.0
npm ERR! node_modules/cypress
npm ERR! dev cypress#"9.6.0" from the root project
npm ERR! peer cypress#"*" from #cypress/code-coverage#3.9.12
npm ERR! node_modules/#cypress/code-coverage
npm ERR! dev #cypress/code-coverage#"^3.9.12" from the root project
npm ERR! 2 more (#cypress/react, cypress-expect)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer cypress#"^4.5.0" from cypress-image-snapshot#4.0.1
npm ERR! node_modules/cypress-image-snapshot
npm ERR! dev cypress-image-snapshot#"^4.0.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: cypress#4.12.1
npm ERR! node_modules/cypress
npm ERR! peer cypress#"^4.5.0" from cypress-image-snapshot#4.0.1
npm ERR! node_modules/cypress-image-snapshot
npm ERR! dev cypress-image-snapshot#"^4.0.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/USER/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/USER/.npm/_logs/2022-04-29T10_17_53_835Z-debug-0.log
This is my package.json file:
{
"scripts": {
"cy:run": "cypress run",
"cy:open": "cypress open"
},
"devDependencies": {
"#cypress/code-coverage": "^3.9.12",
"cypress": "9.6.0",
"cypress-expect": "^2.5.2",
"cypress-image-snapshot": "^4.0.1"
},
"dependencies": {
"#cypress/react": "^5.12.4",
"#cypress/vite-dev-server": "^2.2.2",
"webpack-dev-server": "^4.8.1"
},
"engines": {
"node": ">=18.0.0"
}
}
Not sure what the problem is exactly, but everytime i try to install a package or just purely run npm i, I get the above error, would appreciate it if someone can help?

if there is any issue in running npm install , try to run yarn install command to find which package has problem or dependency,yarn install command will give clear idea to the developer on issue's for installing , you can find them in the warnings as below
warning " > #cypress/react#5.12.5" has unmet peer dependency
"react#^=16.x || ^=17.x". warning " > #cypress/react#5.12.5" has unmet
peer dependency "react-dom#^=16.x || ^=17.x". warning " >
#cypress/vite-dev-server#2.2.3" has unmet peer dependency "vite#>=
2.1.3". warning " > webpack-dev-server#4.9.3" has unmet peer dependency "webpack#^4.37.0 || ^5.0.0". warning "webpack-dev-server >
webpack-dev-middleware#5.3.3" has unmet peer dependency
"webpack#^4.0.0 || ^5.0.0".
use below configuration to resolve the above issue
"scripts": {
"cy:run": "cypress run",
"cy:open": "cypress open"
},
"devDependencies": {
"#cypress/webpack-dev-server": "^2.0.0",
"#cypress/react": "^6.0.0",
"#types/cypress-image-snapshot": "^3.1.4",
"#cypress/code-coverage": "^3.9.12",
"cypress": "^9.6.0",
"cypress-expect": "^2.5.2"
},
"dependencies": {
"#cypress/vite-dev-server": "^2.2.2"
},
"engines": {
"node": ">=18.0.0"
}

The issue might be related to the peerDependencies of the cypress-image-snapshot package.
The peerDependencies look like:
"peerDependencies": {
"cypress": "^4.5.0"
}
But at the moment of writing this response the current version of cypress is 12.2.0 --> https://github.com/cypress-io/cypress/releases
It seems that cypress-image-snapshot need to update the peerDependencies.
I found this issue that is similar to the problem that you are having. Also, the last time the library was updated was on Jan 222.
A workaround could be running npm install --legacy-peer-deps although this doesn't fix the real issue.

Can you override the peer dependency in the package-lock?
"overrides": {
"cypress-image-snapshot" : {
"cypress": "$cypress"
}
}

Related

How to resolve peer dependency conflict

Thanks for reading.
After testing some changes in my local dev environment and having no issues, I promoted the changes to my test environment hosted on AWS Amplify, and the build was failing with the following error:
2022-11-28T19:47:50.604Z [WARNING]: ERR! ERESOLVE could not resolve
npm ERR!
npm
2022-11-28T19:47:50.605Z [WARNING]: ERR! While resolving: styles#0.2.1
npm ERR! Found: assemble#0.24.3
npm ERR! node_modules/assemble
npm ERR!
2022-11-28T19:47:50.605Z [WARNING]: assemble#"^0.24.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer assemble#"~0.3.11" from styles#0.2.1
npm ERR! node_modules/styles
npm ERR! styles#"^0.2.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: assemble#0.3.83
npm ERR! node_modules/assemble
npm ERR! peer assemble#"~0.3.11" from styles#0.2.1
npm ERR! node_modules/styles
npm ERR! styles#"^0.2.1" from the root project
npm ERR!
npm ERR!
2022-11-28T19:47:50.605Z [WARNING]: Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /root/.npm/eresolve-report.txt for a full report.
Here are the two dependencies mentioned in the above error, in the package.json file:
"assemble": "^0.24.3",
"styles": "^0.2.1"
Here are the two dependencies mentioned above, in the package-lock file:
"node_modules/styles": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/styles/-/styles-0.2.1.tgz",
"integrity": "sha1-hJJ7pEf6pvJJ7NIK3wu4X606UUE=",
"dependencies": {
"less": "\~1.4.0"
},
"engines": {
"node": "\>= 0.8.0"
},
"peerDependencies": {
"assemble": "\~0.3.11",
"grunt": "\~0.4.0"
}
},
"node_modules/assemble": {
"version": "0.24.3",
"resolved": "https://registry.npmjs.org/assemble/-/assemble-0.24.3.tgz",
"integrity": "sha1-lSp3S3iAl6TW9Iw6QrpW9ouNZS8=",
"dependencies": {
"assemble-core": "^0.31.0",
"assemble-loader": "^1.0.5",
"base-argv": "^0.5.0",
"base-cli-process": "^0.1.19",
"base-config": "^0.5.2",
"base-questions": "^0.9.1",
"base-runtimes": "^0.2.0",
"cross-spawn": "^5.1.0",
"engine-handlebars": "^0.8.2",
"expand-front-matter": "^1.0.0",
"export-files": "^2.1.1",
"global-modules": "^0.2.3",
"is-valid-app": "^0.3.0",
"lazy-cache": "^2.0.2",
"log-utils": "^0.2.1",
"minimist": "^1.2.0",
"parser-front-matter": "^1.6.3",
"resolve-dir": "^1.0.0"
},
"bin": {
"assemble": "bin/cli.js"
},
"engines": {
"node": "\>=4.0"
}
},
I tried running the build with --force, and --legacy-peer-deps, but neither of the two dependencies mentioned above (assemble, and styles) are affected by either operation, and I still have the same issue.
I've tried installing the version of assemble to version 0.3.11 (as listed as the peerDependecy of styles), and again the build in my local environment works, but after promoting to my test environment on AWS Amplify, the build fails with the following errors:
2022-11-28T19:38:40.756Z [WARNING]: npm ERR!
2022-11-28T19:38:40.756Z [WARNING]: code EUSAGE
2022-11-28T19:38:40.760Z [WARNING]: npm
2022-11-28T19:38:40.760Z [WARNING]: ERR!
npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm ERR!
npm ERR! Missing: immutable#4.1.0 from lock file
npm ERR! Missing: seamless-immutable#7.1.4 from lock file
npm ERR! Missing: typescript#4.9.3 from lock file
I also uninstalled assemble and styles, but ran into the same error when trying to build the test environment.
Additionally, I went and looked at my commit history, and the package.json and package-lock.json files haven't been changed in months, and I've had many successful builds since they were last modified, which adds to my confusion of where this problem came from.
Further info:
Local Dev environment is using node v16.13.1 and npm v8.1.2, and Amplify build image (default image) just specifies in the build logs that its using Node version 16
Uninstalling both dependencies and then running npm update resolved my issues

Npm install fail with node 15 ( Not LTS ) "#angular-devkit/build-angular": "~0.1000.0"

npm install fail with below dependency "#angular-devkit/build-angular" :
sample package.json
{
"name": "myApp",
"version": "0.0.1",
"devDependencies": {
"#angular-devkit/build-angular": "~0.1000.0"
}
}
I am using node V15.5.1 npm v7.3.0
I'm getting below errors :
npm ERR! Found: typescript#4.0.5 npm ERR! node_modules/typescript npm
ERR! peer typescript#">=3.9 <4.1" from #angular/compiler-cli#10.2.4
npm ERR! node_modules/#angular/compiler-cli npm ERR! peer
#angular/compiler-cli#">=10.0.0-next.0 < 11" from
#angular-devkit/build-angular#0.1000.8 npm ERR!
node_modules/#angular-devkit/build-angular npm ERR! npm ERR! Could
not resolve dependency: npm ERR! peer typescript#">=3.9 < 3.10" from
#angular-devkit/build-angular#0.1000.8 npm ERR!
node_modules/#angular-devkit/build-angular
not sure why node/npm is looking for typescript 4.0.5 instead of the version that can suit both the ranges. (peer typescript#">=3.9 <4.1" and peer typescript#">=3.9 < 3.10" )
is this working as expected .
i can able to run the npm install with --legacy-peer-deps flag.
is this a problem or its working as designed . why cant npm choose the version which suits both cases
Use LTS version of node, currently 14.15.4. Changing the version depends on your OS and package manager, but at least on MacOS and Homebrew it goes like this:
brew update
brew install node#14
brew link --overwrite node#14

on giving npm start in command prompt in react js

I am getting the below error every time in my command prompt basically I am unable to open my server because of the start in package.json is throwing the error, i am not able to find what issue is, please advice what is the correct way
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\user>d:
D:>cd reactApp
D:\reactApp>npm install -g npm#latest
C:\Users\user\AppData\Roaming\npm\npm -> C:\Users\user\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
C:\Users\user\AppData\Roaming\npm\npx -> C:\Users\user\AppData\Roaming\npm\node_modules\npm\bin\npx-cli.js
+ npm#5.8.0
added 523 packages in 116.024s
D:\reactApp>rm -rf node_modules
'rm' is not recognized as an internal or external command,
operable program or batch file.
D:\reactApp>npm -rf node_modules
Usage: npm <command>
where <command> is one of:
access, adduser, bin, bugs, c, cache, ci, completion,
config, ddp, dedupe, deprecate, dist-tag, docs, doctor,
edit, explore, get, help, help-search, i, init, install,
install-test, it, link, list, ln, login, logout, ls,
outdated, owner, pack, ping, prefix, profile, prune,
publish, rb, rebuild, repo, restart, root, run, run-script,
s, se, search, set, shrinkwrap, star, stars, start, stop, t,
team, test, token, tst, un, uninstall, unpublish, unstar,
up, update, v, version, view, whoami
npm -h quick help on
npm -l display full usage info
npm help search for help on
npm help npm involved overview
Specify configs in the ini-formatted file:
C:\Users\user\.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config
npm#5.8.0 C:\Users\user\AppData\Roaming\npm\node_modules\npm
D:\reactApp>npm install
npm WARN babel-loader#7.1.4 requires a peer of babel-core#6 but none is installed. You must install peer dependencies yourself.
npm WARN reactapp#1.0.0 No repository field.
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"})
removed 10 packages in 21.906s
D:\reactApp>npm start
> reactapp#1.0.0 start D:\reactApp
> npm run build
> reactapp#1.0.0 build D:\reactApp
> webpack -d && cp src/index.html dist/index.html && webpack-dev-server --content-base src/ --inline --hot
The CLI moved into a separate package: webpack-cli.
Please install 'webpack-cli' in addition to webpack itself to use the CLI.
-> When using npm: npm install webpack-cli -D
-> When using yarn: yarn add webpack-cli -D
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! reactapp#1.0.0 build: `webpack -d && cp src/index.html dist/index.html && webpack-dev-server --content-base src/ --inline --hot`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the reactapp#1.0.0 build 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\user\AppData\Roaming\npm-cache\_logs\2018-03-27T03_57_54_881Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! reactapp#1.0.0 start: `npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the reactapp#1.0.0 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! C:\Users\user\AppData\Roaming\npm-cache\_logs\2018-03-27T03_57_54_983Z-debug.log
D:\reactApp>npm install -g react-scripts
C:\Users\user\AppData\Roaming\npm\react-scripts -> C:\Users\user\AppData\Roaming\npm\node_modules\react-scripts\bin\react-scripts.js
> uglifyjs-webpack-plugin#0.4.6 postinstall C:\Users\user\AppData\Roaming\npm\node_modules\react-scripts\node_modules\uglifyjs-webpack-plugin
> node lib/post_install.js
npm WARN ajv-keywords#3.1.0 requires a peer of ajv#^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 (node_modules\react-scripts\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"})
+ react-scripts#1.1.1
added 1324 packages from 785 contributors in 453.077s
D:\reactApp>npm start
> reactapp#1.0.0 start D:\reactApp
> npm run build
> reactapp#1.0.0 build D:\reactApp
> webpack -d && cp src/index.html dist/index.html && webpack-dev-server --content-base src/ --inline --hot
The CLI moved into a separate package: webpack-cli.
Please install 'webpack-cli' in addition to webpack itself to use the CLI.
-> When using npm: npm install webpack-cli -D
-> When using yarn: yarn add webpack-cli -D
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! reactapp#1.0.0 build: `webpack -d && cp src/index.html dist/index.html && webpack-dev-server --content-base src/ --inline --hot`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the reactapp#1.0.0 build 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\user\AppData\Roaming\npm-cache\_logs\2018-03-27T04_06_58_572Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! reactapp#1.0.0 start: `npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the reactapp#1.0.0 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! C:\Users\user\AppData\Roaming\npm-cache\_logs\2018-03-27T04_06_58_697Z-debug.log
D:\reactApp>npm start
my package.json file is
{
"name": "reactapp",
"version": "1.0.0",
"description": "some basics reactjs",
"main": "index.js",
"scripts": {
"start": "npm run build",
"build": "webpack -d && cp src/index.html dist/index.html && webpack-dev-server --content-base src/ --inline --hot",
"build:prod": "webpack -p && cp src/index.html dist/index.html"
},
"keywords": [
"reactjs"
],
"author": "Harsh mewari",
"license": "ISC",
"dependencies": {
"react": "^16.2.0",
"react-dom": "^16.2.0"
},
"devDependencies": {
"babel-loader": "^7.1.4",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"webpack": "^4.2.0",
"webpack-dev-server": "^3.1.1"
}
}
my webpack.config.js file is
var path=require("path");
var DIST_DIR = path.resolve(dirname,"dist");
var SRC_DIR= path.resolve(_dirname,"src");
var config={
entry: SRC_DIR + "/app/index.js",
output:{
path: DIST_DIR + "/app",
filename:"bundle.js",
publicPath:"/app"
},
modules:{
loaders:[
{
test:/\.js?/,
include: SRC_DIR,
loader:"babel-loader",
query:{
presets:["react","es2015","stage-2"]
}
}
]
};
module.exports= config;
}

npm error peer invalid webpack-dev-server#2.10.0 wants webpack#^2.2.0 ||

I have installed the dependencies via npm below is the package.json
{
"name": "springbootreactjs2",
"version": "1.0.0",
"description": "Spring boot with reactjs",
"scripts": {
"watch": "webpack --watch -d"
},
"author": "",
"license": "ISC",
"dependencies": {
"axios": "^0.17.1",
"react": "16.0.0",
"react-dom": "^16.2.0",
"react-router-dom": "^4.2.2",
"rest": "^2.0.0",
"webpack": "^2.2.0"
},
"devDependencies": {
"babel-core": "^6.18.2",
"babel-loader": "7.1",
"babel-polyfill": "^6.16.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-react": "^6.16.0"
}
}
Whenever i want to install a dependency it keeps throwing the below error
npm WARN package.json springbootreactjs2#1.0.0 No repository field.
npm WARN package.json springbootreactjs2#1.0.0 No README data
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "react#16.0.0" "--save"
npm ERR! node v4.2.2
npm ERR! npm v2.14.7
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package webpack#3.10.0 does not satisfy its siblings' p
eerDependencies requirements!
npm ERR! peerinvalid Peer babel-loader#6.4.1 wants webpack#1 || 2 || ^2.1.0-beta
|| ^2.2.0-rc
npm ERR! peerinvalid Peer webpack-dev-server#2.10.0 wants webpack#^2.2.0 || ^3.0
.0
npm ERR! Please include the following file with any support request:
Below is the install command i am running
npm install --save reactstrap#next react react-dom
Originally the webpack version was 3.10.0 i manually modified the webpack version to 2.2.0 but still for some reasons is still picking version 3.10.0.
Not sure what's wrong here
Remove any dependencies from your package.json file that you don't have installed locally and try again
Update your npm using npm install -g npm#latest.
Install the missing dependencies using npm install
<dependency_name> and run your command again.
If that doesn't work, read on:
I was facing the same issue. Although I was able to install webpack using npm, I couldn't install webpack-cli. So I:
1) Updated npm version to the latest.
Installed yarn (using yum
or apt-get, etc.).
Installed all the dependencies(including
webpack-cli) using yarn
This solved my problem.

Npm errors while I try to install dependencies in loopback (strongloop) webapp

I am new in the NodeJS world. I have created an loopback(strongloop) webapp, but after it I try to run the npm install command in the application's folder I get this output in the terminal (Ubuntu server 14.04 withd newest updates - in a vagrant instance)
vagrant#vagrant-ubuntu-trusty-64:/vagrant/example-app$ npm install
npm WARN package.json example-app#1.0.0 No license field.
npm WARN optional dep failed, continuing ycssmin#1.0.1
npm WARN deprecated jsonstream#1.0.3: use JSONStream instead
npm WARN optional dep failed, continuing request#2.62.0
npm WARN optional dep failed, continuing loopback-explorer#1.8.0
npm ERR! Linux 3.13.0-62-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.1.0
npm ERR! npm v2.14.3
npm ERR! path ../node-uuid/bin/uuid
npm ERR! code EPROTO
npm ERR! errno -71
npm ERR! syscall symlink
npm ERR! EPROTO: protocol error, symlink '../node-uuid/bin/uuid' -> '/vagrant/example-app/node_modules/loopback-datasource-juggler/node_modules/.bin/uuid'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Linux 3.13.0-62-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.1.0
npm ERR! npm v2.14.3
npm ERR! path npm-debug.log.2d5bb41273f18b2da30958b9aa61bfe6
npm ERR! code ETXTBSY
npm ERR! errno -26
npm ERR! syscall rename
npm ERR! ETXTBSY: text file is busy, rename 'npm-debug.log.2d5bb41273f18b2da30958b9aa61bfe6' -> 'npm-debug.log'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /vagrant/example-app/npm-debug.log
This is the generated package.json which has been generated by loopback framework:
{
"name": "example-app",
"version": "1.0.0",
"main": "server/server.js",
"scripts": {
"pretest": "jshint ."
},
"dependencies": {
"compression": "^1.0.3",
"cors": "^2.5.2",
"loopback": "^2.22.0",
"loopback-boot": "^2.6.5",
"loopback-datasource-juggler": "^2.39.0",
"serve-favicon": "^2.0.1"
},
"optionalDependencies": {
"loopback-explorer": "^1.1.0"
},
"devDependencies": {
"jshint": "^2.5.6"
},
"repository": {
"type": "",
"url": ""
},
"description": "example-app"
}
I have tried to run with sudo npm install but I have gotten exactly the same result.
Versions:
Node v4.1.0
Npm v2.14.3
Vagrant 1.7.4
Ubuntu Server 14.04.3 (with the newest updates)
Here is the npm-log file, it's very long.
If you know my mistake, do not hesitate, just answer :)
This is a problem with Vagrant/VirtualBox. Unfortunately, the synced/shared filesystem doesn't support symlinks.
If you don't require this functionality, the easiest thing to do is to just disable it in your Vagrantfile:
# ...
config.vm.synced_folder ".", "/vagrant", disabled: true
# ...
If you do require it, you may be able to find a work around now that you know it is a problem with symlink support, which npm uses for creating bins :-)
See https://docs.vagrantup.com/v2/synced-folders/basic_usage.html for more details.
The error happens, because your mounted shared directory (/vagrant) is on file system which doesn't support symbolic links.
To void this, you need to tell npm that your file system doesn't support symbolic links, e.g.
npm config set bin-links false
Source: npm doesn't work in vagrant at GH-7308
or by specifying --no-bin-links argument for npm install which will prevent npm from creating symlinks for any binaries the package might contain.
Alternative way is to append this to your package.json file, e.g.
"config": {
"bin-links": false
},
As said above, the synced/shared filesystem doesn't support symlinks.
SO, you can install node.js on your Windows host and execute npm install in the host code directory

Resources