Hello Devs,
does anyone have any idea why I can't execute, o365 after install using npm install -g @pnp/office365-cli

thank you for your help.
Mauro
Welcome @isahackSharePoint 👋🏻
Thank you for reporting this issue, however it sounds that this is most likely an issue with npm rather than with the CLI.
Are you able to run any other global npm packages, like gulp for example?
Also could you let us know what version of node and npm you have installed?
@garrytrinder thank for your help.
I don't really know why I can't run o365 or office365,
when use npm I don't have problems, you can view my procedure on:
https://asciinema.org/connect/bbc3f4a6-41c4-4743-965d-877362868542
How did you install node? Using homebrew or direct install?
Sounds like the npm global prefix is missing in your PATH.
What does executing ‘npm config get prefix‘ return?
I install node.js with package https://nodejs.org/dist/v12.13.1/node-v12.13.1.pkg
but after installing it I had to download the version for compatibility with gulp.
I'm following https://www.youtube.com/watch?v=GNukiGIQZfk
but I stuck on powershell because I use mac.
when I run "npm config get prefix" return this:
maurocastro@iMac-de-Mauro ~ % npm config get prefix
/Users/maurocastro/.npm-global
maurocastro@iMac-de-Mauro ~ %
Ok, I've only ever installed node using homebrew which seems to be the much easier and safer way to install packages on MacOS.
If you execute echo $PATH in your terminal window, what is returned?
@garrytrinder
maurocastro@iMac-de-Mauro ~ % echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands
do you know if I can manually map executable of @pnp/office365-cli ?
Try adding the below line to the end of your .zshrc file
export PATH=$HOME/.npm-global/bin:$PATH
@garrytrinder
good news :) now I have more information, but now i can't install @pnp/office365-cli
Maybe can just work on specific version of something?
here is the log.
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'i',
1 verbose cli '-g',
1 verbose cli '@pnp/office365' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 952d0771b76e9f57
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 404 https://registry.npmjs.org/@pnp%2foffice365 757ms
8 http fetch GET 404 https://registry.npmjs.org/@pnp%2foffice365 183ms
9 silly fetchPackageMetaData error for @pnp/office365@latest 404 Not Found - GET https://registry.npmjs.org/@pnp%2foffice365 - Not found
10 timing stage:rollbackFailedOptional Completed in 1ms
11 timing stage:runTopLevelLifecycles Completed in 976ms
12 verbose stack Error: 404 Not Found - GET https://registry.npmjs.org/@pnp%2foffice365 - Not found
12 verbose stack at res.buffer.catch.then.body (/usr/local/lib/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:104:15)
12 verbose stack at process._tickCallback (internal/process/next_tick.js:68:7)
13 verbose statusCode 404
14 verbose pkgid @pnp/office365@latest
15 verbose cwd /Users/maurocastro
16 verbose Darwin 19.0.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "-g" "@pnp/office365"
18 verbose node v10.16.0
19 verbose npm v6.9.0
20 error code E404
21 error 404 Not Found - GET https://registry.npmjs.org/@pnp%2foffice365 - Not found
22 error 404
23 error 404 '@pnp/office365@latest' is not in the npm registry.
24 error 404 You should bug the author to publish it (or use the name yourself!)
25 error 404 Note that you can also install from a
26 error 404 tarball, folder, http url, or git url.
27 verbose exit [ 1, true ]
`
Are you using npm install @pnp/office365-cli?
Your error message seems to suggest that you are using npm install @pnp/office365 instead, which is incorrect...
YEEEEEEEEEIIIIIII!!!!
My last fault.... it's so embarrassing...
it is work now!
Thank you very much @garrytrinder you are awesome!
~ npm install @pnp/office365-cli
[email protected] postinstall /Users/maurocastro/node_modules/@pnp/office365-cli/node_modules/core-js
node postinstall || echo "ignore"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
https://opencollective.com/core-js
https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm audit fix to fix them, or npm audit for detailsGreat! 🚀
Glad that we have been able to unblock you @isahackSharePoint, we hope you enjoy using the CLI.
If you have any suggestions or ideas, we would love to hear from you, raising an issue is the best way to start a discussion 👍🏻
Most helpful comment
YEEEEEEEEEIIIIIII!!!!
My last fault.... it's so embarrassing...
it is work now!
Thank you very much @garrytrinder you are awesome!
~ npm install @pnp/office365-cli
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
added 522 packages from 1197 contributors and audited 7358 packages in 53.421s
found 5 vulnerabilities (1 low, 4 high)
run
npm audit fixto fix them, ornpm auditfor details➜ ~ o365
version
o365$ version
2.3.0
o365$