Shams Sujon
Shams Sujon

Reputation: 865

Foundation CLI does not work. ReferenceError: primordials is not defined

I have Windows 10 (64 bit), Node v13.0.1, npm 6.12.0. I want to install foundation-cli globaly but I am getting "ReferenceError: primordials is not defined" while I command "foundation new" or "foundation -v". Please see my powershell message and tell me about the error and the solution.

PS C:\WINDOWS\system32> npm install --global foundation-cli
>>
npm WARN deprecated [email protected]: 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 [email protected]: This module relies on Node.js's internals and will break at some point. Do not use it, and update to [email protected].
C:\Users\shams\AppData\Roaming\npm\foundation -> C:\Users\shams\AppData\Roaming\npm\node_modules\foundation-cli\bin\foundation.js
+ [email protected]
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

Upvotes: 0

Views: 2042

Answers (1)

user753676
user753676

Reputation:

This is a known problem with NodeJS >= 12. Please try to switch to NodeJS 10.

Upvotes: 2

Related Questions