首页 > 解决方案 > SharePoint Online - React 现代脚本编辑器 - 安装问题

问题描述

在 npm 安装时, react 现代脚本编辑器 (sp-dev-fx-webparts) 出现问题。

很多警告和一个关键错误。

我已经尝试了很多我在互联网上找到的不同的东西并寻找建议:

gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\15.0\Bin\MSBuild.exe ENOENT
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
gyp ERR! stack     at onErrorNT (internal/child_process.js:468:16)
gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:84:21)
gyp ERR! System Windows_NT 10.0.15063

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.12.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.12.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

NPM 版本:6.14.4 节点版本:14.1.0

标签: sharepoint-onlinespfx

解决方案


“SharePoint 框架当前支持的 NodeJS LTS 版本是 Node.js v8.x 和 Node.js v10.x。请注意,SharePoint 框架开发目前不支持 9.x、11.x 或 12.x 版本。以上链接指向 10.20.1 版本。”

https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-development-environment


推荐阅读