Node.js 在节点上失败-sass@4.7.2安装后脚本

Node.js 在节点上失败-sass@4.7.2安装后脚本,node.js,npm,sass,node-sass,Node.js,Npm,Sass,Node Sass,我刚刚下载了最新版本的node.js,我一直在尝试在我的一个项目上安装npm,但我说: 在节点上失败-sass@4.7.2安装后脚本 我试着做:npm重建节点sass--force,但也没有做任何事情 错误日志将返回以下信息: 3209 warn angularfire2@5.0.0-rc.10 requires a peer of @angular/common@^6.0.0 but none is installed. You must install peer dependencies

我刚刚下载了最新版本的
node.js
,我一直在尝试在我的一个项目上安装
npm
,但我说:

在节点上失败-sass@4.7.2安装后脚本

我试着做:
npm重建节点sass--force
,但也没有做任何事情

错误日志将返回以下信息:

3209 warn angularfire2@5.0.0-rc.10 requires a peer of @angular/common@^6.0.0 
but none is installed. You must install peer dependencies yourself.
3210 warn angularfire2@5.0.0-rc.10 requires a peer of @angular/core@^6.0.0 but none is installed. You must install peer dependencies yourself.
3211 warn angularfire2@5.0.0-rc.10 requires a peer of @angular/platform-browser@^6.0.0 but none is installed. You must install peer dependencies yourself.
3212 warn angularfire2@5.0.0-rc.10 requires a peer of @angular/platform-browser-dynamic@^6.0.0 but none is installed. You must install peer dependencies yourself.
3213 warn angularfire2@5.0.0-rc.10 requires a peer of firebase@^5.0.3 but none is installed. You must install peer dependencies yourself.
3214 warn angularfire2@5.0.0-rc.10 requires a peer of rxjs@^6.0.0 but none is installed. You must install peer dependencies yourself.
3215 warn geofire@4.1.2 requires a peer of firebase@^2.4.0 || 3.x.x but none is installed. You must install peer dependencies yourself.
3216 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
3217 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
3218 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
3218 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
3218 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   win32
3218 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
3219 verbose stack Error: node-sass@4.7.2 postinstall: `node scripts/build.js`
3219 verbose stack Exit status 1
3219 verbose stack     at EventEmitter.<anonymous> (C:\Users\Simon K\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:283:16)
3219 verbose stack     at emitTwo (events.js:126:13)
3219 verbose stack     at EventEmitter.emit (events.js:214:7)
3219 verbose stack     at ChildProcess.<anonymous> (C:\Users\Simon K\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
3219 verbose stack     at emitTwo (events.js:126:13)
3219 verbose stack     at ChildProcess.emit (events.js:214:7)
3219 verbose stack     at maybeClose (internal/child_process.js:925:16)
3219 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
3220 verbose pkgid node-sass@4.7.2
3221 verbose cwd C:\xampp\htdocs\project x\projectx
3222 verbose Windows_NT 10.0.16299
3223 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Simon K\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
3224 verbose node v8.11.2
3225 verbose npm  v6.0.1
3226 error code ELIFECYCLE
3227 error errno 1
3228 error node-sass@4.7.2 postinstall: `node scripts/build.js`
3228 error Exit status 1
3229 error Failed at the node-sass@4.7.2 postinstall script.
3229 error This is probably not a problem with npm. There is likely additional logging output above.
3230 verbose exit [ 1, true ]
我还尝试完全删除我的
node\u modules
文件夹,并再次运行
npm install
,但没有成功

其中一个可能的原因是,在更新节点之前,我遵循了以下建议:

他说:

  • 下载并保存正确版本的节点sass的本地副本 二进制-win32-x64-64_binding.node。例如,将其下载到 以下位置:C:\node sass\win32-x64-64\u binding.node
  • 供给 中节点sass二进制文件的完整路径的引用 sass_二进制_路径npm配置参数(在~/.npmrc文件中): npm配置设置的sass\u二进制\u路径 例如,npm配置集sass_二进制_路径 C:\node sass\win32-x64-64\u binding.node
  • 运行npm安装命令 再次尝试正确安装@angular/cli
  • 执行ng serve或npm start 你的问题应该已经过去了
  • 我不知道这是否有关系。。我不这么认为,因为我更新了节点,试图强制
    节点sass
    重建,但我不知道


    关于如何解决这个问题有什么想法/建议吗?谢谢大家!

    仅从node_模块中删除node sass文件夹,并运行以下命令

    npm install node-sass@4.7.2 --save
    

    尝试使用此标志运行
    --unsafe perm=true

    npm i node-sass --unsafe-perm=true
    

    尝试检查您的节点版本。也许你使用了错误的版本。使用NVM进行版本管理。

    试试这个

    npm audit
    npm audit fix
    

    没有必要做太多,您正面临这个问题,因为您正在尝试安装npmsass@4.7.2在不知道它是否与pm版本兼容的情况下,最好的解决方案是编写下面提到的命令 npm安装--保存开发节点sass 这将在您的系统上安装与您现有的npm版本兼容的npm sass。 谢谢,待会儿见
    首先,运行命令

    它甚至没有
    node\u模块中的
    node sass
    文件夹
    请尝试此npm安装-f节点-sass@4.7.2hmm.. 这可能有用,但我现在得到了一个不同的错误。。有什么想法吗?这似乎不是节点sass错误,请在不删除节点模块的情况下再次尝试npm安装,并发布更新的日志。您是否有sudo权限?尝试使用sudo命令运行相同的命令。这不会提供问题的答案。一旦你有足够的钱,你将能够;相反我也遇到了同样的问题,审计修复对我有效,因为有两个漏洞阻止了安装您救了我的命对我有效。。谢谢。也为我工作过,你好!
    npm audit
    npm audit fix