无法使用NPM安装BigCommerce模板CLI

发布于 2025-01-31 10:15:24 字数 3099 浏览 3 评论 0原文

我正在尝试使用NPM安装BigCommerce模板CLI。我遵循

我没有NPM的经验,我想做的就是将style.CSS文件添加到大型商务主题中,他们迫使您使用NPM。显然,这对我不起作用。任何人都可以在我的脑海中赢得声音之前帮助我,然后我把笔记本电脑放在洗碗机中。

NPM版本:

{
  npm: '8.10.0',
  node: '14.19.3',
  v8: '8.4.371.23-node.87',
  uv: '1.42.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.18.1',
  modules: '83',
  nghttp2: '1.42.0',
  napi: '8',
  llhttp: '2.1.4',
  openssl: '1.1.1o',
  cldr: '40.0',
  icu: '70.1',
  tz: '2021a3',
  unicode: '14.0'
}

来自尝试的模板CLI安装中的日志:


michaelcalland@Michaels-MBP-2 ~ % npm install -g @bigcommerce/stencil-cli  
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /Users/michaelcalland/.nvm/versions/node/v14.19.3/bin/node /Users/michaelcalland/.nvm/versions/node/v14.19.3/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/Users/michaelcalland/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /Users/michaelcalland/.npm/_cacache/tmp/git-clonemTrJwq
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c node scripts/install.js
npm ERR! npm ERR! internal/modules/cjs/loader.js:905
npm ERR! npm ERR!   throw err;
npm ERR! npm ERR!   ^
npm ERR! npm ERR! 
npm ERR! npm ERR! Error: Cannot find module 'npmconf'
npm ERR! npm ERR! Require stack:
npm ERR! npm ERR! - /Users/michaelcalland/.npm/_cacache/tmp/git-clonemTrJwq/scripts/install.js
npm ERR! npm ERR!     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
npm ERR! npm ERR!     at Function.Module._load (internal/modules/cjs/loader.js:746:27)
npm ERR! npm ERR!     at Module.require (internal/modules/cjs/loader.js:974:19)
npm ERR! npm ERR!     at require (internal/modules/cjs/helpers.js:101:18)
npm ERR! npm ERR!     at Object.<anonymous> (/Users/michaelcalland/.npm/_cacache/tmp/git-clonemTrJwq/scripts/install.js:8:15)
npm ERR! npm ERR!     at Module._compile (internal/modules/cjs/loader.js:1085:14)
npm ERR! npm ERR!     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
npm ERR! npm ERR!     at Module.load (internal/modules/cjs/loader.js:950:32)
npm ERR! npm ERR!     at Function.Module._load (internal/modules/cjs/loader.js:790:12)
npm ERR! npm ERR!     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12) {
npm ERR! npm ERR!   code: 'MODULE_NOT_FOUND',
npm ERR! npm ERR!   requireStack: [
npm ERR! npm ERR!     '/Users/michaelcalland/.npm/_cacache/tmp/git-clonemTrJwq/scripts/install.js'
npm ERR! npm ERR!   ]
npm ERR! npm ERR! }
npm ERR! 
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR!     /Users/michaelcalland/.npm/_logs/2022-05-23T15_04_52_632Z-debug-0.log

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/michaelcalland/.npm/_logs/2022-05-23T15_04_48_251Z-debug-0.log

我尝试卸载/安装NPM,但我真的不明白在这里该怎么做。

I'm trying to install the BigCommerce Stencil Cli using NPM. I followed the instructions on the bigcommerce website but when I try to install the Stencil CLI I get errors.

I'm not experienced with NPM, all I want to do it add a style.css file to a bigcommerce theme and they are forcing you to use NPM. Clearly it isn't working for me. Can anyone help me before the voices in my head win, and i put my laptop in the dishwasher.

NPM VERSION:

{
  npm: '8.10.0',
  node: '14.19.3',
  v8: '8.4.371.23-node.87',
  uv: '1.42.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.18.1',
  modules: '83',
  nghttp2: '1.42.0',
  napi: '8',
  llhttp: '2.1.4',
  openssl: '1.1.1o',
  cldr: '40.0',
  icu: '70.1',
  tz: '2021a3',
  unicode: '14.0'
}

Log from an attempted stencil-cli install:


michaelcalland@Michaels-MBP-2 ~ % npm install -g @bigcommerce/stencil-cli  
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /Users/michaelcalland/.nvm/versions/node/v14.19.3/bin/node /Users/michaelcalland/.nvm/versions/node/v14.19.3/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/Users/michaelcalland/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /Users/michaelcalland/.npm/_cacache/tmp/git-clonemTrJwq
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c node scripts/install.js
npm ERR! npm ERR! internal/modules/cjs/loader.js:905
npm ERR! npm ERR!   throw err;
npm ERR! npm ERR!   ^
npm ERR! npm ERR! 
npm ERR! npm ERR! Error: Cannot find module 'npmconf'
npm ERR! npm ERR! Require stack:
npm ERR! npm ERR! - /Users/michaelcalland/.npm/_cacache/tmp/git-clonemTrJwq/scripts/install.js
npm ERR! npm ERR!     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
npm ERR! npm ERR!     at Function.Module._load (internal/modules/cjs/loader.js:746:27)
npm ERR! npm ERR!     at Module.require (internal/modules/cjs/loader.js:974:19)
npm ERR! npm ERR!     at require (internal/modules/cjs/helpers.js:101:18)
npm ERR! npm ERR!     at Object.<anonymous> (/Users/michaelcalland/.npm/_cacache/tmp/git-clonemTrJwq/scripts/install.js:8:15)
npm ERR! npm ERR!     at Module._compile (internal/modules/cjs/loader.js:1085:14)
npm ERR! npm ERR!     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
npm ERR! npm ERR!     at Module.load (internal/modules/cjs/loader.js:950:32)
npm ERR! npm ERR!     at Function.Module._load (internal/modules/cjs/loader.js:790:12)
npm ERR! npm ERR!     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12) {
npm ERR! npm ERR!   code: 'MODULE_NOT_FOUND',
npm ERR! npm ERR!   requireStack: [
npm ERR! npm ERR!     '/Users/michaelcalland/.npm/_cacache/tmp/git-clonemTrJwq/scripts/install.js'
npm ERR! npm ERR!   ]
npm ERR! npm ERR! }
npm ERR! 
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR!     /Users/michaelcalland/.npm/_logs/2022-05-23T15_04_52_632Z-debug-0.log

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/michaelcalland/.npm/_logs/2022-05-23T15_04_48_251Z-debug-0.log

I've tried to uninstall/install npm but I don't really understand what to do here.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

所谓喜欢 2025-02-07 10:15:24

我通过文档中的建议使用节点V14.20在Mac上解决了此问题,但是从NPM V7转换为NPM V6,文档中未提及。

假设您已安装了NVM,我做了以下操作:

nvm install 14.20
nvm use 14.20
npm install -g [email protected] (or the last v6)
npm install -g @bigcommerce/stencil-cli

现在成功安装了这一点。

I solved this on Mac by using Node v14.20 as advised in the documentation but switching from NPM v7 to NPM v6, this is not mentioned in the documentation.

Assuming you have NVM installed, I did the following:

nvm install 14.20
nvm use 14.20
npm install -g [email protected] (or the last v6)
npm install -g @bigcommerce/stencil-cli

This now successfuly installs.

猫性小仙女 2025-02-07 10:15:24

我也遇到了同样的问题,但发现 this 。您只需使用节点版本14.20.0即可。

I also faced the same problem but found this. You just have to use node version 14.20.0.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文