Node.js 安装MobileFirst Platform mfpdev cli的节点错误

Node.js 安装MobileFirst Platform mfpdev cli的节点错误,node.js,ibm-mobilefirst,command-line-interface,npm-install,Node.js,Ibm Mobilefirst,Command Line Interface,Npm Install,您好,我在安装mfpdev cli时出错 我在节点中运行: 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 conta

您好,我在安装mfpdev cli时出错

我在节点中运行:

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 ]
我的节点版本是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
你应该试试这个:

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

npm install -g mfpdev-cli@latest

似乎他们注意到了这些错误,因为mfpdev cli的代码在5小时前更新()

我昨天也犯了同样的错误(即使在将npm降级到3.10.10及更低版本以及在Windows 10和Mac Sierra上),它仍然在两个操作系统中抛出了一些错误,但它终于起作用了(mfpdev-v 8.0.0-2017101013)

  • 安装在Windows 10上,节点为V6.9.3;npm 3.10.10
  • 安装在Mac Sierra上,节点为V6.11.4;npm 3.10.10
编辑:


我在两个操作系统中将npm更新为其最新版本(5.5.1),但安装仍然失败,因此需要降级到3.10.10(如Gaurab Kumar的回答所述)。

似乎他们注意到了这些错误,因为mfpdev cli的代码在5小时前更新()

我昨天也犯了同样的错误(即使在将npm降级到3.10.10及更低版本以及在Windows 10和Mac Sierra上),它仍然在两个操作系统中抛出了一些错误,但它终于起作用了(mfpdev-v 8.0.0-2017101013)

  • 安装在Windows 10上,节点为V6.9.3;npm 3.10.10
  • 安装在Mac Sierra上,节点为V6.11.4;npm 3.10.10
编辑:

我在两个操作系统中都将npm更新为其最新版本(5.5.1),但安装仍然失败,因此需要降级到3.10.10(如Gaurab Kumar的回答所述)。

可能重复的可能重复的