gpt4 book ai didi

node.js - 安装 MobileFirst Platform mfpdev-cli 时出现 Node 错误

转载 作者:太空宇宙 更新时间:2023-11-04 03:24:19 26 4
gpt4 key购买 nike

您好,我安装 mfpdev-cli 时出错。

我在 Node 中运行:

npm install -g mfpdev-cli

另外,我尝试过:

npm install -g --no-optional mfpdev-cli

我得到了相同的结果:

npm ERR! code ENOLOCAL
npm ERR! Could not install from "..\AppData\Roaming\npm\node_modules\mdo-adapter-actions" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR! ..\AppData\Roaming\npm-cache\_logs\2017-10-06T19_33_40_852Z-debug.log

日志文件:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\admin\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'mfpdev-cli' ]
2 info using npm@5.4.2
3 info using node@v8.6.0
4 verbose npm-session c592940cb4bd8510
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 200 https://registry.npmjs.org/mfpdev-cli 17ms (from cache)
8 silly pacote tag manifest for mfpdev-cli@latest fetched in 57ms
9 silly install loadIdealTree
10 silly install cloneCurrentTreeToIdealTree
11 silly install loadShrinkwrap
12 silly install loadAllDepsIntoIdealTree
13 silly resolveWithNewModule mfpdev-cli@8.0.2017092810 checking installable status
14 silly pacote trying https://registry.npmjs.org/mfpdev-cli/-/mfpdev-cli-8.0.2017092810.tgz by hash: sha1-xVC4PO9ZSewF6xzlXsWExVTqvsw=
15 silly pacote https://registry.npmjs.org/mfpdev-cli/-/mfpdev-cli-8.0.2017092810.tgz extracted to C:\Users\ADMIN\AppData\Local\Temp\npm-11192-a75b2045\unpack-1eeac08f by content address 11899ms
16 silly addBundled read tarball
17 silly cleanup remove extracted module
18 silly fetchPackageMetaData error for mdo-adapter-actions@file:..\mdo-adapter-actions Could not install from "C:\Users\admin\AppData\Roaming\npm\node_modules\mdo-adapter-actions" as it does not contain a package.json file.
19 verbose stack Error: ENOENT: no such file or directory, open 'C:\Users\admin\AppData\Roaming\npm\node_modules\mdo-adapter-actions\package.json'
20 verbose cwd H:\
21 verbose Windows_NT 10.0.15063
22 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\admin\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "mfpdev-cli"
23 verbose node v8.6.0
24 verbose npm v5.4.2
25 error code ENOLOCAL
26 error Could not install from "C:\Users\admin\AppData\Roaming\npm\node_modules\mdo-adapter-actions" as it does not contain a package.json file.
27 verbose exit [ 1, true ]

我的 Node 版本是 8.6.0,NPM 版本是 5.4.2,操作系统是 Windows 10。

我尝试降级版本并清理缓存,但始终是相同的错误。

如何安装 IMB MobileFirst Platform CLI?

此问题仅发生在最新版本的 mfpdev-cli v8.0.2017090705 我尝试了 stackoverflow 中的不同解决方案,但它们对我不起作用。

最佳答案

你应该尝试这个:

npm cache clean
npm set registry https://registry.npmjs.org/
npm set registry http://registry.npmjs.org/

npm install -g mfpdev-cli@latest

关于node.js - 安装 MobileFirst Platform mfpdev-cli 时出现 Node 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46612941/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com