在node-sass@4.9.3安装后脚本失败

时间:2019-09-25 17:31:06

标签: sass compiler-errors node-modules

我花了最后三天的时间来解决这个问题,但我完全迷失了。

该应用程序过去可以在Ubuntu上完美运行,但是由于我切换到MacOS,所以无法使其运行。

这些是形成巨大错误日志的代码的最后几位。

很有趣,我可以从一般的MacOS终端安装node-sass@4.12.0,但是运行相同的'npm install node-sass @ latest“命令会返回此错误。

有什么想法吗?

815 warn hoist-non-react-statics@3.1.0 requires a peer of react@>=14.x but none is installed. You must install peer dependencies yourself.
816 warn react-addons-css-transition-group@15.6.2 requires a peer of react@^15.4.2 but none is installed. You must install peer dependencies yourself.
817 warn react-redux@5.1.1 requires a peer of redux@^2.0.0 || ^3.0.0 || ^4.0.0-0 but none is installed. You must install peer dependencies yourself.
818 warn react-router@4.3.1 requires a peer of react@>=15 but none is installed. You must install peer dependencies yourself.
819 warn react-router-dom@4.3.1 requires a peer of react@>=15 but none is installed. You must install peer dependencies yourself.
820 warn react-router-hash-link@1.2.1 requires a peer of react@>=15 but none is installed. You must install peer dependencies yourself.
821 warn react-sound@1.2.0 requires a peer of react@^15.3.0 || ^16.0.0-0 but none is installed. You must install peer dependencies yourself.
822 warn react-transition-group@1.2.1 requires a peer of react@^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
823 warn react-transition-group@1.2.1 requires a peer of react-dom@^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
824 warn url-loader@1.1.2 requires a peer of webpack@^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
825 warn w@1.0.0 No description
826 warn optional SKIPPING OPTIONAL DEPENDENCY: speaker@0.3.1 (node_modules/speaker):
827 warn optional SKIPPING OPTIONAL DEPENDENCY: speaker@0.3.1 install: `node-gyp rebuild`
827 warn optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
828 verbose optional SKIPPING OPTIONAL DEPENDENCY:
828 verbose optional Failed at the speaker@0.3.1 install script.
828 verbose optional SKIPPING OPTIONAL DEPENDENCY: This is probably not a problem with npm. There is likely additional logging output above.
829 verbose stack Error: node-sass@4.9.3 postinstall: `node scripts/build.js`
829 verbose stack Exit status 1
829 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
829 verbose stack     at EventEmitter.emit (events.js:209:13)
829 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
829 verbose stack     at ChildProcess.emit (events.js:209:13)
829 verbose stack     at maybeClose (internal/child_process.js:1021:16)
829 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
830 verbose pkgid node-sass@4.9.3
831 verbose cwd /Users/wojciechwojas/Desktop/PROJEKTY/02_Kindergarten_Website
832 verbose Darwin 18.5.0
833 verbose argv "/usr/local/Cellar/node/12.10.0/bin/node" "/usr/local/bin/npm" "install"
834 verbose node v12.10.0
835 verbose npm  v6.11.3
836 error code ELIFECYCLE
837 error errno 1
838 error node-sass@4.9.3 postinstall: `node scripts/build.js`
838 error Exit status 1
839 error Failed at the node-sass@4.9.3 postinstall script.
839 error This is probably not a problem with npm. There is likely additional logging output above.
840 verbose exit [ 1, true ]


1 个答案:

答案 0 :(得分:0)

经过一些谷歌搜索后,我发现它可能与当前使用的节点版本有关。请参阅:https://www.npmjs.com/package/node-sass

如果不能升级模块版本可以使用nvm-windows之类的工具在节点版本之间切换(https://github.com/coreybutler/nvm-windows)