Cli-microsoft365: Bug report: cli broken in azure shell

Created on 22 Dec 2020  ·  2Comments  ·  Source: pnp/cli-microsoft365

Description

Creating a new shell in azure does not provide a working m365 cli

Steps to reproduce

  1. Open portal.azure.com, click on the shell in the top right corner.
  2. Create a storage account if not already created
  3. type m365 help

Expected result

Should provide the help section

Actual result

Error - see below

bassem@Azure:~$ node -v
v8.16.0
bassem@Azure:~$ npm list -g --depth=0
/usr/local/lib
├── @pnp/[email protected]
├── [email protected]
├── [email protected]
└── [email protected]

npm ERR! peer dep missing: canvas@^2.5.0, required by [email protected]
npm ERR! peer dep missing: bufferutil@^4.0.1, required by [email protected]
npm ERR! peer dep missing: utf-8-validate@^5.0.2, required by [email protected]
bassem@Azure:~$ m365 help
/usr/local/lib/node_modules/@pnp/cli-microsoft365/node_modules/webidl-conversions/lib/index.js:357
    } catch {
            ^

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:617:28)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at Module.patchedRequire [as require] (/usr/local/lib/node_modules/@pnp/cli-microsoft365/node_modules/diagnostic-channel/dist/src/patchRequire.js:14:46)
    at require (internal/module.js:11:18)

Environment

Bash on Azure Shell
Node v8 (which isn't an option I chose but the default it was created with)

bug work in progress

Most helpful comment

Thanks @garrytrinder - appreciate the swift response and the linking, didn’t know Azure Cloud Shell had its own repo. I’ll keep an eye on both into the new year, enjoy the holidays!

All 2 comments

Thanks for raising @BassemNKhalil

Yes, unfortunately this is the case and we are aware of this, @appieschot has raised an issue in the Azure Cloud Shell Repo which has been acknowledged by the team, I expect that this will be looked into further in the New Year.

https://github.com/Azure/CloudShell/issues/63

Feel free to add to the above issue, I'll leave this issue open so we can track from our side.

Sorry for the trouble, we hope to have this resolved ASAP.

Thanks @garrytrinder - appreciate the swift response and the linking, didn’t know Azure Cloud Shell had its own repo. I’ll keep an eye on both into the new year, enjoy the holidays!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arjunumenon picture arjunumenon  ·  3Comments

garrytrinder picture garrytrinder  ·  3Comments

VelinGeorgiev picture VelinGeorgiev  ·  3Comments

garrytrinder picture garrytrinder  ·  3Comments

waldekmastykarz picture waldekmastykarz  ·  3Comments