简体   繁体   English

npm错误在node-sass@4.9.0安装脚本上失败

[英]npm Error Failed at the node-sass@4.9.0 install script

I received This error when I am trying to run "ionic start MyApp" on windows terminal. 当我尝试在Windows终端上运行“ ionic start MyApp”时收到此错误。

I am running from a new machine and I already tried to reinstall nodejs and ionic but the same error is coming all the time. 我正在一台新机器上运行,并且已经尝试重新安装nodejs和ionic,但始终会出现相同的错误。

Can anyone help me? 谁能帮我?

npm WARN tar invalid entry

    > node-sass@4.9.0 install C:\Users\Felipe\Desktop\Kokua App\KokuaApp1\node_modules\node-sass
    > node scripts/install.js

    module.js:549
         throw err;
         ^

    Error: Cannot find module 'minimatch'
         at Function.Module._resolveFilename (module.js:547:15)
         at Function.Module._load (module.js:474:25)
         at Module.require (module.js:596:17)
         at require (internal/module.js:11:18)
         at Object.<anonymous> (C:\Users\Felipe\Desktop\Kokua
    App\KokuaApp1\node_modules\true-case-path\node_modules\glob\glob.js:44:17)
         at Module._compile (module.js:652:30)
         at Object.Module._extensions..js (module.js:663:10)
         at Module.load (module.js:565:32)
         at tryModuleLoad (module.js:505:12)
         at Function.Module._load (module.js:497:3)
    npm WARN rollback Rolling back node-pre-gyp@0.10.0 failed (this is probably harmless): EPERM: operation not
    permitted, scandir 'C:\Users\Felipe\Desktop\Kokua App\KokuaApp1\node_modules\fsevents\node_modules'
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted
    {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! node-sass@4.9.0 install: `node scripts/install.js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the node-sass@4.9.0 install 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\Felipe\AppData\Roaming\npm-cache\_logs\2018-06-13T23_54_19_462Z-debug.log

Try installing the latest version of ionic: 尝试安装最新版本的ionic:

$ npm cache verify
$ npm i -g ionic cordova

If this doesn't work, you need to install the library minimatch manually: 如果这不起作用,则需要手动安装库minimatch

$ npm i --save minimatch

Solve the problem with those steps: 使用以下步骤解决问题:

$ npm uninstall cordova ionic
$ npm cache clean -f
$ npm install npm -g

Then uninstall nodejs, reinstall again and reinstall ionic cordova 然后卸载nodejs,再次重新安装并重新安装ionic cordova

$ npm install -g cordova ionic

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM