Foundation CLI不起作用。 ReferenceError:未定义原始变量

时间:2019-11-01 05:54:43

标签: node.js npm command-line-interface zurb-foundation

我有Windows 10(64位),节点v13.0.1,npm 6.12.0。我想安装foundation-cli globaly,但是在我命令“ foundation new”或“ foundation -v”时出现“ ReferenceError:primordials未定义”。请查看我的Powershell消息,并告诉我有关错误和解决方案的信息。

PS C:\WINDOWS\system32> npm install --global foundation-cli
>>
npm WARN deprecated bower@1.8.8: We don't recommend using Bower for new projects. Please consider Yarn and Webpack or Parcel. You can read how to migrate legacy project here: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
npm WARN deprecated natives@1.1.6: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x.
C:\Users\shams\AppData\Roaming\npm\foundation -> C:\Users\shams\AppData\Roaming\npm\node_modules\foundation-cli\bin\foundation.js
+ foundation-cli@2.2.5
updated 3 packages in 12.24s
PS C:\WINDOWS\system32> foundation new
fs.js:27
const { Math, Object } = primordials;
                         ^

ReferenceError: primordials is not defined
[90m    at fs.js:27:26[39m
    at req_ (C:\Users\shams\AppData\Roaming\npm\node_modules\[4mfoundation-cli[24m\node_modules\[4mnatives[24m\index.js:143:24)
    at Object.req [as require] (C:\Users\shams\AppData\Roaming\npm\node_modules\[4mfoundation-cli[24m\node_modules\[4mnatives[24m\index.js:55:10)
    at Object.<anonymous> (C:\Users\shams\AppData\Roaming\npm\node_modules\[4mfoundation-cli[24m\node_modules\[4mgraceful-fs[24m\fs.js:1:37)
[90m    at Module._compile (internal/modules/cjs/loader.js:971:30)[39m
[90m    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1011:10)[39m
[90m    at Module.load (internal/modules/cjs/loader.js:822:32)[39m
[90m    at Function.Module._load (internal/modules/cjs/loader.js:730:14)[39m
[90m    at Module.require (internal/modules/cjs/loader.js:864:19)[39m
[90m    at require (internal/modules/cjs/helpers.js:74:18)[39m

1 个答案:

答案 0 :(得分:0)

这是NodeJS> = 12的已知问题。请尝试切换到NodeJS 10。