question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EBADPLATFORM when npm install --save-dev msw on Windows 10

See original GitHub issue

Describe the bug

Running npm install --save-dev msw on Windows 10 produces an error

npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS:    darwin
npm ERR! notsup Valid Arch:  undefined
npm ERR! notsup Actual OS:   win32
npm ERR! notsup Actual Arch: x64

Environment

  • msw: 0.27.1
  • nodejs: 15.12.0
  • npm: 7.6.3

To Reproduce

Steps to reproduce the behavior:

  1. Run npm install --save-dev msw
  2. See error

Expected behavior

msw is susscessfully installed on Windows 10 environment

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
kettanaitocommented, Mar 19, 2021

To clarify: that warning shouldn’t affect your experience with MSW. It’s stated in the message that fsevents is an optional dependency. I don’t see anything we can do on the library’s side, it’s the way fsevents behaves, not being our direct dependency.

0reactions
amd-9commented, Mar 19, 2021

@kettanaito sure!

On machine with nodejs 12.3.1 result was

PS C:\test> npm install msw

> msw@0.27.1 postinstall C:\test\node_modules\msw
> node -e "try{require('./config/scripts/postinstall')}catch(e){}"

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN test@1.0.0 No description
npm WARN test@1.0.0 No repository field.

+ msw@0.27.1
added 77 packages from 122 contributors and audited 78 packages in 4.143s

8 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

PS C:\test>     

On machine with nodejs 15.12.0 (suprisingly):

PS C:\test> npm install msw

added 77 packages, and audited 78 packages in 4s

8 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
PS C:\test>
Read more comments on GitHub >

github_iconTop Results From Across the Web

npm install error (code EBADPLATFORM) - node.js
This worked effortless for me on Windows: Go to project's "package-lock.json" file.
Read more >
open-draft - Bountysource
Running npm install --save-dev msw on Windows 10 produces an error npm ERR! code EBADPLATFORM npm ERR! notsup Unsupported platform for fsevents@2.3.2: ...
Read more >
Error while updating the instance - Google Groups
npm install. npm ERR! code EBADPLATFORM ... npm install --save-dev acorn@^6.0.0 html-webp. ... _extensions..js (internal/modules/cjs/loader.js:712:10).
Read more >
[Solved]-npm install error (code EBADPLATFORM)-node.js
I had this same issue on my dev machine (Win 10 x64). I had no intention of running or using fsevents locally. I...
Read more >
npm install error fsevents in Ohter Mac Platforms - Medium
When I tried to run npm install, it gave me this error. error code EBADPLATFORM. error notsup Unsupported platform for fsevents@1.1.3: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found