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:UsersAromaAppDataRoamingnpm-cache_logs2018-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.
halfer
19.7k17 gold badges95 silver badges183 bronze badges
asked Mar 25, 2018 at 11:48
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 togitignore
- then run the build command
npm install ; npm run build
using the build from last comment option onrender.com dashboard
answered Oct 14, 2019 at 6:04
1
Error is indicating that you are installing fsevents
module in other OS rather than Mac
fsevents
module only works for Mac Operting system
answered Mar 25, 2018 at 11:53
Nishant DixitNishant Dixit
5,2805 gold badges15 silver badges28 bronze badges
2
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.
answered Feb 27, 2021 at 9:38
3
Add following to your project’s package.json
"optionalDependencies": {
"fsevents": "*"
},
and then install with —no-optional
answered Apr 15, 2020 at 14:41
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
answered May 7, 2021 at 17:49
WM1WM1
4517 silver badges14 bronze badges
Remove "fsevents": "version"
, on package.json
if you try to install on Windows.
Kevin
15.6k7 gold badges53 silver badges70 bronze badges
answered Oct 13, 2019 at 22:30
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.)
answered May 25, 2022 at 11:50
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.
answered Mar 25, 2018 at 11:52
PaulPaul
35.3k9 gold badges92 silver badges121 bronze badges
1
I think In your Project Folder First Delete package.lock.json and then try:
npm install
This is Works For Me.
answered Mar 9, 2021 at 4:55
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.
answered Sep 3, 2020 at 17:56
tgolischtgolisch
6,4493 gold badges22 silver badges42 bronze badges
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.
answered Apr 28, 2021 at 17:59
HenriHenri
91 bronze badge
please first delete package-lock.json file and remove «win-node-env»: «^0.4.0» this line from package.json
answered Aug 24, 2021 at 6:53
2
This is what worked for me:
- Delete node_modules
- Delete package-lock.json
- run
npm i
answered Dec 10, 2021 at 20:13
LCIIILCIII
2,6923 gold badges25 silver badges41 bronze badges
Add peer dependency in your JSON package like below
{
"name": "chai-as-promised",
"peerDependencies": {
"chai": "1.x"
}
}
David Buck
3,67235 gold badges33 silver badges35 bronze badges
answered Jun 9, 2020 at 14:28
Current Behavior:
When following the documentation on workplaces, I get this error:
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin"} (current: {"os":"linux","arch":"x64"})
npm ERR! notsup Valid OS: darwin
npm ERR! notsup Valid Arch: undefined
npm ERR! notsup Actual OS: linux
npm ERR! notsup Actual Arch: x64
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-12-24T19_27_34_887Z-debug.log
exiting dev mode because first build failed: unable to stream build output: The command '/bin/sh -c npm i' returned a non-zero code: 1
Expected Behavior:
Not to get this error
Steps To Reproduce:
Following this project structure:
+-- package-lock.json
+-- package.json
`-- workspace-a
`-- package.json
`-- library
`-- package.json
With this in my root package.json
{
"name": "my-workspaces-powered-project",
"workspaces": [
"workspace-a",
"library",
]
}
on Docker
- run
npm i
(in root) - see error
on Arch Linux
- run
npm i
(in root) - don’t see error
- run
npm i
again (in root) - see error
fsevents is not explicitly included as a dependency on my package.json
files
Environment:
- OS: Arch Linux 5.9.14-arch1-1 (also node:alpine latest image from docker)
- Node: 15.4.0 (installed through nvm on Arch Linux)
- npm: 7.0.15
The log is as follows:
0 verbose cli [
0 verbose cli '/home/user/.nvm/versions/node/v15.4.0/bin/node',
0 verbose cli '/home/user/.nvm/versions/node/v15.4.0/bin/npm',
0 verbose cli 'i'
0 verbose cli ]
1 info using npm@7.3.0
2 info using node@v15.4.0
3 timing config:load:defaults Completed in 3ms
4 timing config:load:file:/home/user/.nvm/versions/node/v15.4.0/lib/node_modules/npm/npmrc Completed in 1ms
5 timing config:load:builtin Completed in 1ms
6 timing config:load:cli Completed in 2ms
7 timing config:load:env Completed in 0ms
8 timing config:load:file:/home/user/code/monorepo/.npmrc Completed in 0ms
9 timing config:load:project Completed in 4ms
10 timing config:load:file:/home/user/.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:/home/user/.nvm/versions/node/v15.4.0/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:setUserAgent Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 12ms
19 verbose npm-session 68ceb47419fb7473
20 timing npm:load Completed in 19ms
21 timing arborist:ctor Completed in 1ms
22 timing idealTree:init Completed in 495ms
23 timing idealTree:userRequests Completed in 0ms
24 silly idealTree buildDeps
25 timing idealTree:#root Completed in 0ms
26 timing idealTree:auth Completed in 0ms
27 timing idealTree:common Completed in 0ms
28 timing idealTree:buildDeps Completed in 2ms
29 timing idealTree:fixDepFlags Completed in 0ms
30 timing idealTree Completed in 501ms
31 timing command:install Completed in 503ms
32 verbose stack Error: Unsupported platform
32 verbose stack at checkPlatform (/home/user/.nvm/versions/node/v15.4.0/lib/node_modules/npm/node_modules/npm-install-checks/index.js:35:25)
32 verbose stack at Arborist.[checkPlatform] (/home/user/.nvm/versions/node/v15.4.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:235:5)
32 verbose stack at /home/user/.nvm/versions/node/v15.4.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:228:33
32 verbose stack at async Arborist.buildIdealTree (/home/user/.nvm/versions/node/v15.4.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:212:7)
32 verbose stack at async Promise.all (index 1)
32 verbose stack at async Arborist.reify (/home/user/.nvm/versions/node/v15.4.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:123:5)
32 verbose stack at async install (/home/user/.nvm/versions/node/v15.4.0/lib/node_modules/npm/lib/install.js:38:3)
33 verbose pkgid fsevents@2.1.3
34 verbose cwd /home/user/code/monorepo
35 verbose Linux 5.9.14-arch1-1
36 verbose argv "/home/user/.nvm/versions/node/v15.4.0/bin/node" "/home/user/.nvm/versions/node/v15.4.0/bin/npm" "i"
37 verbose node v15.4.0
38 verbose npm v7.3.0
39 error code EBADPLATFORM
40 error notsup Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin"} (current: {"os":"linux","arch":"x64"})
41 error notsup Valid OS: darwin
41 error notsup Valid Arch: undefined
41 error notsup Actual OS: linux
41 error notsup Actual Arch: x64
42 verbose exit 1
Questions : npm install error (code EBADPLATFORM)
2023-02-06T12:47:13+00:00 2023-02-06T12:47:13+00:00
679
When I tried to run npm install, it gave me issuse uvdos node.js 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:UsersAromaAppDataRoamingnpm-cache_logs2018-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 issuse uvdos node.js Nodejs again but still get the same error.
Total Answers 14
26
Answers 1 : of npm install error (code EBADPLATFORM)
I had the same issue, deleting my solved uvdos npm «package-lock.json» and re-running npm solved uvdos npm install worked
0
2023-02-06T12:47:13+00:00 2023-02-06T12:47:13+00:00Answer Link
mRahman
5
Answers 2 : of npm install error (code EBADPLATFORM)
Error is indicating that you are solved uvdos npm installing fsevents module in other OS solved uvdos npm rather than Mac
fsevents module only works for Mac solved uvdos npm Operting system
0
2023-02-06T12:47:13+00:00 2023-02-06T12:47:13+00:00Answer Link
karim
4
Answers 3 : of npm install error (code EBADPLATFORM)
This worked effortless for me on solved uvdos npm 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 solved uvdos npm good to go.
0
2023-02-06T12:47:13+00:00 2023-02-06T12:47:13+00:00Answer Link
rohim
4
Answers 4 : of npm install error (code EBADPLATFORM)
Add following to your project’s solved uvdos npm package.json
"optionalDependencies": {
"fsevents": "*"
},
and then install with —no-optional
0
2023-02-06T12:47:13+00:00 2023-02-06T12:47:13+00:00Answer Link
rohim
4
Answers 5 : of npm install error (code EBADPLATFORM)
Same npm install error (code solved uvdos npm EBADPLATFORM):
I had forced fsevents onto my windows solved uvdos npm machine npm i -f fsevents…
npm solved uvdos npm responded «I hope you know what your solved uvdos npm 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
0
2023-02-06T12:47:13+00:00 2023-02-06T12:47:13+00:00Answer Link
joya
4
Answers 6 : of npm install error (code EBADPLATFORM)
Remove «fsevents»: «version», on solved uvdos npm package.json if you try to install on solved uvdos npm Windows.
0
2023-02-06T12:47:13+00:00 2023-02-06T12:47:13+00:00Answer Link
joya
1
Answers 7 : of npm install error (code EBADPLATFORM)
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 solved uvdos npm can’t use it if you’re on Windows.
0
2023-02-06T12:47:13+00:00 2023-02-06T12:47:13+00:00Answer Link
rohim
5
Answers 8 : of npm install error (code EBADPLATFORM)
I think In your Project Folder First solved uvdos npm Delete package.lock.json and then try:
npm install
This is Works For Me.
0
2023-02-06T12:47:13+00:00 2023-02-06T12:47:13+00:00Answer Link
rohim
3
Answers 9 : of npm install error (code EBADPLATFORM)
I’m developing on Mac. I deleted «os»: [ solved uvdos npm «darwin» ] from package.lock.json, ran solved uvdos npm the build, deployed to my Google Cloud solved uvdos npm App Engine project, and it finally solved uvdos npm worked.
Source: belykh’s comment (Nothing posted solved uvdos npm in any of the other answers helped me.)
0
2023-02-06T12:47:13+00:00 2023-02-06T12:47:13+00:00Answer Link
karim
2
Answers 10 : of npm install error (code EBADPLATFORM)
I had this same issue on my dev machine solved uvdos npm (Win 10 x64). I had no intention of solved uvdos npm running or using fsevents locally. I solved uvdos npm just needed to upgrade my local copy of solved uvdos npm fsevents, to resolve a vulnerability. solved uvdos npm Running with the -f option solved it:
npm install fsevents@1.2.9 -f
Note: -f means «force installation». npm solved uvdos npm gives an ominous warning like «I hope solved uvdos npm you know what you’re doing». Afaik solved uvdos npm fsevents isn’t dangerous to have on a solved uvdos npm win32 machine. It only «works» on mac. solved uvdos npm The npm page for fsevents says «This is solved uvdos npm a low-level library. For a solved uvdos npm cross-platform file watching module that solved uvdos npm uses fsevents, check out Chokidar». I solved uvdos npm was only upgrading and wasn’t choosing solved uvdos npm to use it on a win32 machine. So keep solved uvdos npm that in-mind.
That being-said, it didn’t break solved uvdos npm anything for me. No BSoDs, errors, etc. solved uvdos npm App still works. Build works. All good.
0
2023-02-06T12:47:13+00:00 2023-02-06T12:47:13+00:00Answer Link
joya
2
Answers 11 : of npm install error (code EBADPLATFORM)
This error message says that fsevents solved uvdos npm package does not support your operating solved uvdos npm system. In my case the solution for this solved uvdos npm error was to upgrade npm to the latest solved uvdos npm version.
0
2023-02-06T12:47:13+00:00 2023-02-06T12:47:13+00:00Answer Link
joya
6
Answers 12 : of npm install error (code EBADPLATFORM)
Add peer dependency in your JSON package solved uvdos npm like below
{
"name": "chai-as-promised",
"peerDependencies": {
"chai": "1.x"
}
}
0
2023-02-06T12:47:13+00:00 2023-02-06T12:47:13+00:00Answer Link
karim
5
Answers 13 : of npm install error (code EBADPLATFORM)
please first delete package-lock.json solved uvdos npm file and remove «win-node-env»: «^0.4.0» solved uvdos npm this line from package.json
0
2023-02-06T12:47:13+00:00 2023-02-06T12:47:13+00:00Answer Link
rohim
6
Answers 14 : of npm install error (code EBADPLATFORM)
This is what worked for me:
- Delete node_modules
- Delete package-lock.json
- run
npm i
0
2023-02-06T12:47:13+00:00 2023-02-06T12:47:13+00:00Answer Link
rohim
1933
March 26, 2018, at 00:45 AM
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:UsersAromaAppDataRoamingnpm-cache_logs2018-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.
Any help will be appreciated. I have been stuck on this error for 2 days.
Answer 1
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.
Answer 2
Error is indicating that you are installing fsevents
module in other OS rather than Mac
fsevents
module is only work for Mac Operting system
-
05:30
Trying to take the file extension out of my URL
-
04:00
display list that in each row 1 li
-
00:00
Read audio channel data from video file nodejs
-
10:30
session not saved after running on the browser
-
9:10
Best way to trigger worker_thread OOM exception in Node.js
-
07:40
Firebase Cloud Functions: PubSub, «res.on is not a function»
-
04:00
TypeError: Cannot read properties of undefined (reading ‘createMessageComponentCollector’)
-
9:20
AWS XRAY on Fargate service
-
7:40
How to resolve getting Error 429 Imgur Api
Когда я попытался запустить npm install, он выдал такую ошибку:
$ 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:UsersAromaAppDataRoamingnpm-cache_logs2018-03-
25T11_33_58_338Z-debug.log
Версия узла:
$node -v
v8.10.0
Я пробовал все, например:
npm cache clear
npm cache verify
npm i -g npm@latest
Я даже попытался снова удалить и переустановить Nodejs, но все равно получаю ту же ошибку.
Ответы
11
Ошибка говорит сама за себя:
Unsupported platform for fsevents@1.1.3:
wanted {"os":"darwin","arch":"any"}
(current: {"os":"win32","arch":"x64"})
Этот модуль не поддерживает Windows, вы не можете использовать его, если у вас Windows.
Ошибка означает, что вы устанавливаете модуль fsevents в другую ОС, а не в Mac.
Модуль fsevents работает только с системой Mac Operting
Удалите «fsevents»: «version», на package.json, если вы пытаетесь установить в Windows.
У меня была такая же проблема, удаление моего «package-lock.json» и повторный запуск npm install работал
Добавьте в свой проект package.json
"optionalDependencies": {
"fsevents": "*"
},
А затем установите с помощью —no-optional
Добавьте одноранговую зависимость в свой пакет JSON, как показано ниже
{
"name": "chai-as-promised",
"peerDependencies": {
"chai": "1.x"
}
}
У меня была такая же проблема на моей машине разработчика (Win 10 x64). У меня не было намерения запускать или использовать fsevents локально. Мне просто нужно было обновить мою локальную копию fsevents, чтобы устранить уязвимость. Работа с опцией -f решила эту проблему:
npm install fsevents@1.2.9 -f
Примечание: -f означает «принудительная установка». npm выдает зловещее предупреждение вроде «Надеюсь, ты знаешь, что делаешь». Afaik fsevents не опасно иметь на машине win32. «Работает» только на Mac. На странице npm для fsevents говорится: «Это низкоуровневая библиотека. Для кросс-платформенного модуля просмотра файлов, который использует fsevents, проверьте Chokidar». Я только обновлял и не собирался использовать его на машине win32. Так что имейте это в виду.
При этом для меня это ничего не сломало. Никаких BSoD, ошибок и т. д. Приложение по-прежнему работает. Сборка работает. Все хорошо.
Для меня это сработало в Windows без особых усилий:
- Перейдите в файл проекта package.lock.json.
- Нажмите «Ctrl + F» (чтобы включить поиск по ключевым словам)
- Типа «дарвин»
- Везде, где в файле написано «darwin», замените это на «win32».
Перезагрузите свой VS Code, и все будет в порядке.
Я думаю, что в папке проекта сначала удалите package.lock.json, а затем попробуйте:
npm install
Это работает для меня.
В этом сообщении об ошибке говорится, что пакет fsevents не поддерживает вашу операционную систему. В моем случае решением этой ошибки было обновление npm до последней версии.
Такая же ошибка установки npm (код EBADPLATFORM):
Я форсировал fsevents на моей машине с Windows npm i -f fsevents …
npm ответил: «Надеюсь, вы знаете, что делаете».
Чтобы отремонтировать, необходимо
- удалить package-lock.json
- удалить строку: fsevents@2.3.2 в package.json (ваш суффикс может отличаться)
- повторно запустил установку npm
Другие вопросы по теме
When I tried to run npm install
, it gave me this error:
$ npm install
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for [email protected]: 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:UsersAromaAppDataRoamingnpm-cache_logs2018-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 [email protected]
I even tried uninstalling and reinstalling Nodejs again but still get the same error.
13 Answers
I had the same issue, deleting my «package-lock.json» and re-running npm install
worked
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: [email protected] in package.json (your suffix may differ)
- re-ran npm install
The error says it all:
Unsupported platform for [email protected]:
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.
Remove "fsevents": "version"
, on package.json
if you try to install on Windows.
I think In your Project Folder First Delete package.lock.json and then try:
npm install
This is Works For Me.
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.
Add peer dependency in your JSON package like below
{
"name": "chai-as-promised",
"peerDependencies": {
"chai": "1.x"
}
}
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 [email protected] -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 is what worked for me:
- Delete node_modules
- Delete package-lock.json
- run
npm i
please first delete package-lock.json file and remove «win-node-env»: «^0.4.0» this line from package.json
Здравствуйте. Решил начать обучение по sass, создал в вебшторм package.json, далее хотел установить gulp, ввел в терминале команду npm i gulp —save dev, выдало следующую ошибку:
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for inotify@1.4.6: wanted {"os":"linux","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS: linux
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: x64
-
Вопрос заданболее трёх лет назад
-
329 просмотров
Пригласить эксперта
Вы опечатались, между «save» и «dev» должен быть дефис: npm i gulp --save-dev
.
Ваша же (некорректная в данной ситуации) команда говорит npm установить пакет dev, который зависит от пакета inotify, который предназначен только для linux, и, разумеется, под windows возникает ошибка «эта платформа не поддерживается».
-
Показать ещё
Загружается…
09 февр. 2023, в 15:13
2000 руб./за проект
09 февр. 2023, в 15:06
2000 руб./за проект
09 февр. 2023, в 15:02
12000 руб./за проект
Минуточку внимания
When I tried to run npm install
, it gave me this error:
$ npm install npm ERR! code EBADPLATFORM npm ERR! notsup Unsupported platform for [email protected]: 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:UsersAromaAppDataRoamingnpm-cache_logs2018-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 [email protected]
I even tried uninstalling and reinstalling Nodejs again but still get the same error.
How do I repair npm permissions?
You can fix this problem using one of three options: Change the permission to npm’s default directory. Change npm’s default directory to another directory. Install Node with a package manager that takes care of this for you.
I had the same issue, deleting my «package-lock.json» and re-running npm install
worked
Error is indicating that you are installing fsevents
module in other OS rather than Mac
fsevents
module only works for Mac Operting system