#node.js #npm #sharepoint #npm-install #spfx
#node.js #npm #sharepoint #npm-установка #spfx
Вопрос:
Я пытаюсь установить node js и npm для веб-части SPFX Sharepoint.(Версия узла: v14.4.0, версия Npm: 6.14.5). Когда я пытаюсь «gulp trust-dev-cert», получаю следующие ошибки:
ReferenceError: primordials is not defined
at fs.js:39:5
at req_ (node_modulesnativesindex.js:143:24)
at Object.req [as require] (D:VM_NodeJSGetSharePointListItems_001node_modulesnativesindex.js:55:10)
at Object.<anonymous> (node_modulesvinyl-fsnode_modulesgraceful-fsfs.js:1:37)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14)
at Module.require (internal/modules/cjs/loader.js:1089:19)
at require (internal/modules/cjs/helpers.js:73:18)
at Object.<anonymous> (node_modulesvinyl-fsnode_modulesgraceful-fsgraceful-fs.js:3:27)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14)
at Module.require (internal/modules/cjs/loader.js:1089:19)
About to exit with code: 1
Process terminated before summary could be written, possible error in async code not continuing!
Trying to exit with exit code 1
Ниже приведена ошибка при запуске: команда gulp serve
ReferenceError: primordials is not defined
at fs.js:39:5
at req_ (node_modulesnativesindex.js:143:24)
at Object.req [as require] (node_modulesnativesindex.js:55:10)
at Object.<anonymous> (node_modulesvinyl-fsnode_modulesgraceful-fsfs.js:1:37)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14)
at Module.require (internal/modules/cjs/loader.js:1089:19)
at require (internal/modules/cjs/helpers.js:73:18)
at Object.<anonymous> (node_modulesvinyl-fsnode_modulesgraceful-fsgraceful-fs.js:3:27)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14)
at Module.require (internal/modules/cjs/loader.js:1089:19)
About to exit with code: 1
Process terminated before summary could be written, possible error in async code not continuing!
Trying to exit with exit code 1
—
Пожалуйста, помогите мне установить правильную версию.
Ответ №1:
Поддержка только SPFX Node.js 10.x.
Вы могли бы получить эту информацию здесь:
https://learn.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-development-environment