When I tried to run npm install, it gave me this error:
$ npm install
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for fsevents#1.1.3: wanted
{"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS: darwin
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: x64
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Aroma\AppData\Roaming\npm-cache\_logs\2018-03-
25T11_33_58_338Z-debug.log
The node version:
$node -v
v8.10.0
I tried every thing, like:
npm cache clear
npm cache verify
npm i -g npm#latest
I even tried uninstalling and reinstalling Nodejs again but still get the same error.
I had the same issue, deleting my "package-lock.json" and re-running npm install worked
For those having issue on render.com
remove package-lock.json from your repo or add to gitignore
then run the build command npm install ; npm run build using the build from last comment option on render.com dashboard
Error is indicating that you are installing fsevents module in other OS rather than Mac
fsevents module only works for Mac Operting system
This worked effortless for me on Windows:
Go to project's "package-lock.json" file.
Press "Ctrl+F" (to enable keyword search).
Type "darwin".
Wherever it says "darwin" in the file, change that to "win32".
Restart your VS Code and you should be good to go.
Add following to your project's package.json
"optionalDependencies": {
"fsevents": "*"
},
and then install with --no-optional
Same npm install error (code EBADPLATFORM):
I had forced fsevents onto my windows machine npm i -f fsevents...
npm responded "I hope you know what your doing".
To repair, needed to
delete package-lock.json
delete line: fsevents#2.3.2 in package.json (your suffix may differ)
re-ran npm install
Remove "fsevents": "version", on package.json if you try to install on Windows.
I'm developing on Mac. I deleted "os": [ "darwin" ] from package.lock.json, ran the build, deployed to my Google Cloud App Engine project, and it finally worked.
Source: belykh's comment (Nothing posted in any of the other answers helped me.)
The error says it all:
Unsupported platform for fsevents#1.1.3:
wanted {"os":"darwin","arch":"any"}
(current: {"os":"win32","arch":"x64"})
This module doesn't support Windows, you can't use it if you're on Windows.
I think In your Project Folder First Delete package.lock.json and then try:
npm install
This is Works For Me.
I had this same issue on my dev machine (Win 10 x64). I had no intention of running or using fsevents locally. I just needed to upgrade my local copy of fsevents, to resolve a vulnerability. Running with the -f option solved it:
npm install fsevents#1.2.9 -f
Note: -f means "force installation". npm gives an ominous warning like "I hope you know what you're doing". Afaik fsevents isn't dangerous to have on a win32 machine. It only "works" on mac. The npm page for fsevents says "This is a low-level library. For a cross-platform file watching module that uses fsevents, check out Chokidar". I was only upgrading and wasn't choosing to use it on a win32 machine. So keep that in-mind.
That being-said, it didn't break anything for me. No BSoDs, errors, etc. App still works. Build works. All good.
This error message says that fsevents package does not support your operating system. In my case the solution for this error was to upgrade npm to the latest version.
please first delete package-lock.json file and remove "win-node-env": "^0.4.0" this line from package.json
This is what worked for me:
Delete node_modules
Delete package-lock.json
run npm i
Add peer dependency in your JSON package like below
{
"name": "chai-as-promised",
"peerDependencies": {
"chai": "1.x"
}
}
I am trying to do 'npm install' inside one of my folders but i am getting error code E403 Forbidden :
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
npm WARN deprecated minimatch#2.0.10: Please update to minimatch 3.0.2 or higher
to avoid a RegExp DoS issue
npm WARN deprecated minimatch#0.2.14: Please update to minimatch 3.0.2 or higher
to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs#1.2.3: graceful-fs v3.0.0 and before will fail
on node releases >= v7.0. Please update to graceful-fs#^4.0.0 as soon as
possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0
(node_modules\chokidar\node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 403 Forbidden:
https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz
npm ERR! code E403
npm ERR! 403 Forbidden: binary-extensions#^1.0.0
My npm version is 5.5.1
My node version is v8.9.1
Also my system was formatted today and I had to re-install and re-setup everything from scratch. npm install was working till yesterday before my system was formatted.
I have attached the log file here.
https://github.com/angular/angular-cli/files/1499291/2017-11-23T13_25_27_656Z-debug.log
Thanks in advance
EDIT: every npm install is failing.
for reference here are the entries in my .npmrc file:
registry=http://registry.npmjs.org/
proxy=http://user_name:password#proxy:port
https-proxy=http://user_name:password#proxy:port
strict-ssl=false
I have tried many commands to get this working but no luck.
Note: my password contains '#' symbol but i have encoded it in my .npmrc file as %40
Ok, so i got around this particular problem. Seems like i had to update http to https in registry, and E403 was gone. But still i was facing other issues so decided to downgrade npm to 3.10.10 and node to 6.10.3.
From the first line it's saying old node-uuid module is deprecated and won't be maintained moving forward. Try reinstalling using these commands.
npm uninstall --save node-uuid
npm install --save uuid
In the second line it's asking for installation of minimatch
So try running the command :
npm install -g minimatch#3.0.4
I'm trying to run this project.
After updating minimatch version to 3.10.9, I'm getting the following error:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\webpack\node_modules\watchpack\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
My configuration:
Node v - 4.4.2
npm v - 3.10.9
32 bit windows OS
It's a warning, not an error. It occurs because fsevents is an optional dependency, used only when project is run on macOS environment (the package provides 'Native Access to Mac OS-X FSEvents').
And since you're running your project on Windows, fsevents is skipped as irrelevant.
There is a PR to fix this behaviour here: https://github.com/npm/cli/pull/169
This still appears to be an issue, causing package installations to be aborted with warnings about optional packages not being installed because of "Unsupported platform".
The problem relates to the "shrinkwrap" or package-lock.json which gets persisted after every package manager execution. Subsequent attempts keep failing as this file is referenced instead of package.json.
Adding these options to the npm install command should allow packages to install again.
--no-optional argument will prevent optional dependencies from being installed.
--no-shrinkwrap argument, which will ignore an available package lock or
shrinkwrap file and use the package.json instead.
--no-package-lock argument will prevent npm from creating a package-lock.json file.
The complete command looks like this:
npm install --no-optional --no-shrinkwrap --no-package-lock
nJoy!
Using parameter --force:
npm i -f
This answer worked for me, add this to your package.json
"optionalDependencies": {
"fsevents": "^2.3.2"
}
Unsupported platform for fsevents
The current best solution is upgrading your version of npm, which won't have this warning.
If using a Windows machine, an easy way to upgrade is with the tool Upgrade npm on Windows.
npm WARN optional Skipping failed optional dependency /forever/forever-monitor/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.14
npm WARN embedly#0.3.2 No license field.
These are just warning so not critical fatal errors but should be paid attention to in order to prevent problems in the future.
npm WARN optional Skipping failed optional dependency /forever/forever-monitor/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.14
This is saying that fsevents has some optional dependencies that weren't installed. It's also saying that your architecture, most likely your operating system, isn't supported for this package.
npm WARN embedly#0.3.2 No license field.
The developer of this package didn't add a license field to the package.json file for the package. Not an error, not something you can fix, just something the developer of the package should add in at some point.
I'm trying to run my react-native project on android but when I try to execute it I get the following error on the android simulator:
"Requiering unknown module ./bindings. If you are sure the module is
there, try restarting the packager or running npm install"
The thing is that I have checked up node_modules and I can see that the module is there. I have already tried to remove node_modules and install all of them again but didn't work.
I have also tried to install bindings with npm install bindings and I get the following error:
npm WARN optional Skipping failed optional dependency
/noble/bluetooth-hci-socket:
npm WARN notsup Not compatible with your operating system or
architecture: bluetooth-hci-socket#0.4.4
I'm on MACOS