0
votes

I get the following error in npm when I run npm install -g @vue/cli

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\@vue\cli\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! file cmd npm ERR! path cmd npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn cmd npm ERR! [email protected] postinstall: node scripts/postinstall npm ERR! spawn cmd ENOENT npm ERR! npm ERR! Failed at the [email protected] postinstall 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\Danijel\AppData\Roaming\npm-cache_logs\2018-09-24T12_48_07_8Z-debug.log

Can anyone help me solve this error?

1
Welcome to Stack Overflow! I've tweaked the format of your question to make it easier for people to read the question and understand the problem you are facing. Feel free to add any extra information you think is important to the question.Christopher Moore
You should look in 2018-09-24T12_48_07_8Z-debug.log as instructed.ceejayoz
The problem seems to be with node's child_process.spawn which is used by the [email protected] postinstall script See this: child_process.spawn does not work with npm run scripts on windows github.com/nodejs/node/issues/3675DogBot

1 Answers

1
votes

fsevents Looking at the error this dependency is looking to work on darwin which is Mac and you are using Windows. It's a library allows applications to register for notifications of changes to a given directory tree in MacOS. Your vue app should be fine without it on windows.

protobufjs is a Protocol Buffers Library. It's used for serializing structured data. Take a look at https://github.com/protocolbuffers/protobuf for protocol buffers for windows. It's a binary to support protocol buffers from github.