首页 > 解决方案 > 我在安装 Zurb Foundation for HTML 电子邮件时遇到问题

问题描述

我能够下载 Foundation,但是当我尝试运行 Foundation new --framework emails 命令时,它不起作用并给我这个错误消息。

我应该怎么办?

信息:

fs.js:27
const { Math, Object, Reflect } = primordials;

ReferenceError: primordials is not defined

at fs.js:27:35

at req_ (/Users/evanscott/.fnm/node-versions/v12.0.0/installation/lib/node_modules/foundation-cli/node_modules/natives/index.js:143:24)

at Object.req [as require] (/Users/evanscott/.fnm/node-versions/v12.0.0/installation/lib/node_modules/foundation-cli/node_modules/natives/index.js:55:10)

at Object. (/Users/evanscott/.fnm/node-versions/v12.0.0/installation/lib/node_modules/foundation-cli/node_modules/graceful-fs/fs.js:1:37)

at Module._compile (internal/modules/cjs/loader.js:759:30)

at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)

at Module.load (internal/modules/cjs/loader.js:628:32)

at Function.Module._load (internal/modules/cjs/loader.js:555:12)

at Module.require (internal/modules/cjs/loader.js:666:19)

at require (internal/modules/cjs/helpers.js:16:16)

之后我尝试了 sudo npm install primordial ,这就是我得到的,

npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated core-js@1.2.7: core-js@<2.6.5 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.

> primordial@0.11.0 preinstall /Users/evanscott/node_modules/primordial
> npm install n --global && n lts

npm WARN checkPermissions Missing write access to /Users/evanscott/.fnm/node-versions/v12.0.0/installation/lib/node_modules/n
npm ERR! path /Users/evanscott/.fnm/node-versions/v12.0.0/installation/lib/node_modules/n
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/Users/evanscott/.fnm/node-versions/v12.0.0/installation/lib/node_modules/n'
npm ERR!  [Error: EACCES: permission denied, access '/Users/evanscott/.fnm/node-versions/v12.0.0/installation/lib/node_modules/n'] {
npm ERR!   stack: 'Error: EACCES: permission denied, access ' +
npm ERR!     "'/Users/evanscott/.fnm/node-versions/v12.0.0/installation/lib/node_modules/n'",
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/Users/evanscott/.fnm/node-versions/v12.0.0/installation/lib/node_modules/n'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/evanscott/.npm/_logs/2019-05-05T07_18_27_777Z-debug.log
npm WARN enoent ENOENT: no such file or directory, open '/Users/evanscott/package.json'
npm WARN evanscott No description
npm WARN evanscott No repository field.
npm WARN evanscott No README data
npm WARN evanscott No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 243
npm ERR! primordial@0.11.0 preinstall: `npm install n --global && n lts`
npm ERR! Exit status 243
npm ERR! 
npm ERR! Failed at the primordial@0.11.0 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/evanscott/.npm/_logs/2019-05-05T07_18_33_460Z-debug.log

然后我尝试切换到我的项目文件夹并执行基础命令,但没有成功。

还有其他想法吗?

我认为问题与 Gulp 和全球 cli 有关,他们可能已经停产了?我不确定。我认为 Gulp 的版本与 Node.js 不兼容。我都升级了,还是不行。当我安装运行较低版本节点的 Ubuntu 时,它短暂工作,但我不得不升级它,然后它停止工作。

我能够下载 Foundation,但是当我尝试运行 Foundation new --framework emails 命令时,它不起作用并给我这个错误消息。

之后我尝试了 sudo npm install primordial 这就是我得到的(error message 2)

然后我尝试切换到我的项目文件夹并执行基础命令,但没有成功。

还有其他想法吗?

错误信息在上面

标签: node.jsinstallationgulpzurb-foundation

解决方案


推荐阅读