Reputation: 3706
Hello I have an error of installing mfpdev-cli.
I run in Node:
npm install -g mfpdev-cli
Also, I tried:
npm install -g --no-optional mfpdev-cli
And I have the same result:
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
Log file:
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 [email protected]
3 info using [email protected]
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 [email protected] 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 ]
My Node version is 8.6.0, NPM version is 5.4.2 and OS is Windows 10.
I tried to downgrade versions and cleaning cache, but it is the same error all the time.
How to install IMB MobileFirst Platform CLI?
This problem only happens for latest version of mfpdev-cli v8.0.2017090705
I tried different solutions from stackoverflow, and they didn't work for me.
Upvotes: 0
Views: 1188
Reputation: 2174
You should try this:
npm cache clean
npm set registry https://registry.npmjs.org/
npm set registry http://registry.npmjs.org/
npm install -g mfpdev-cli@latest
Upvotes: 2
Reputation: 11
It seems they noticed these errors since mfpdev-cli's code was updated 5 hours ago (https://www.npmjs.com/package/mfpdev-cli).
I was having the same errors yesterday (even after downgrading npm to 3.10.10 and lower versions and on Windows 10 and Mac Sierra) and it's still throwing some errors in both OS but it's finally working (mfpdev -v 8.0.0-2017101013).
Edit:
I updated npm to its latest version (5.5.1) in both OS and the installation still failed, so a downgrade to the 3.10.10 is needed (as stated on Gaurab Kumar's answer).
Upvotes: 1