通过npm安装mfpdev-cli时我收到以下错误:
$ npm install -g mfpdev-cli@latest
npm ERR! addLocal Could not install /usr/local/lib/node_modules/mdo-adapter-actions
npm ERR! addLocal Could not install /usr/local/lib/node_modules/mdo-android-support
npm ERR! addLocal Could not install /usr/local/lib/node_modules/mdo-app-config
npm ERR! addLocal Could not install /usr/local/lib/node_modules/mdo-app-preview
npm ERR! addLocal Could not install /usr/local/lib/node_modules/mdo-app-pull
npm ERR! addLocal Could not install /usr/local/lib/node_modules/mdo-app-push
npm ERR! addLocal Could not install /usr/local/lib/node_modules/mdo-app-register
npm ERR! addLocal Could not install /usr/local/lib/node_modules/mdo-app-webencrypt
npm ERR! addLocal Could not install /usr/local/lib/node_modules/mdo-app-webupdate
npm ERR! addLocal Could not install /usr/local/lib/node_modules/mdo-cmd-adapter
npm ERR! addLocal Could not install /usr/local/lib/node_modules/mdo-cmd-app
npm ERR! addLocal Could not install /usr/local/lib/node_modules/mdo-cmd-config
npm ERR! addLocal Could not install /usr/local/lib/node_modules/mdo-cmd-info
npm ERR! addLocal Could not install /usr/local/lib/node_modules/mdo-cmd-server
npm ERR! addLocal Could not install /usr/local/lib/node_modules/mdo-cordova-support
npm ERR! addLocal Could not install /usr/local/lib/node_modules/mdo-errors
npm ERR! addLocal Could not install /usr/local/lib/node_modules/mdo-exec
npm ERR! addLocal Could not install /usr/local/lib/node_modules/mdo-ios-support
npm ERR! addLocal Could not install /usr/local/lib/node_modules/mdo-browser-support
npm ERR! addLocal Could not install /usr/local/lib/node_modules/mdo-mbs
npm ERR! addLocal Could not install /usr/local/lib/node_modules/mdo-server-support
npm ERR! addLocal Could not install /usr/local/lib/node_modules/mdo-windows-support
npm ERR! addLocal Could not install /usr/local/lib/node_modules/platform-manager
npm ERR! fetch failed https://registry.npmjs.org/ibm-strings/-/ibm-strings-0.1.4.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 404
npm ERR! fetch failed https://registry.npmjs.org/mfp-config-xml/-/mfp-config-xml-0.0.3.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 404
npm ERR! fetch failed https://registry.npmjs.org/pluggington/-/pluggington-0.3.3.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 404
有关如何解决此问题并安装最新版本的MobileFirst CLI的任何想法?我在Mac OS X 10.11.6上运行npm版本3.10.7,我的节点版本是4.2.4。
感谢您的帮助,
约翰
答案 0 :(得分:3)
来源:https://portal2portal.blogspot.in/2017/12/ibm-mobilefirst-8-commanding-cli.html
2018年5月, npm install -g mfpdev-cli仍然无法正常工作,但我找到了一种方法让它工作。 节点版本必须为7.3.0,npm版本必须为3.10.10。
步骤: 1.将(或升级)节点降级到7.3.0。复制并粘贴这些命令以删除节点。
$ sudo rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*}
$ sudo apt autoremove
2。现在使用nvm或n或任何你喜欢的方式安装所需的node(7.3.0)版本。我安装了nvm所以我用nvm
做了$ nvm install 7.3.0
使用此命令节点和npm将自动安装到所需的版本。在运行最终命令之前验证npm和node:
$ npm install -g mfpdev-cli
或:
$ sudo npm install -g mfpdev-cli
在我的情况下,它不适用于sudo。但它可以在你的情况下工作。
信用证转到该链接中的原始海报。奖励!
答案 1 :(得分:2)
事实证明,npm的最新版本发生了变化,因为只有版本3.10.7才会出现此问题。解决方法是将你的npm版本回归到3.10.6。
MobileFirst开发团队正在开发修复程序,一旦发生这种情况,我会用这些信息更新此答案。
如果您对此有任何疑问,请在下面发帖。
谢谢,
John Gerken
答案 2 :(得分:2)
我遇到过同样的问题。
我查看了我的npm
版本,它是3.10.9
。我将其降级为2.14.7
,解决了我在404
错误方面的问题。