Skip to content

Bug report: Cannot find module chalk #2592

@BBokdam

Description

@BBokdam

Description

When running the command m365 teams team get --id [id of a team], getting error message. When running a list of all teams everything works fine.

Steps to reproduce

m365 teams team get --id [id of a team]

Expected result

All information about a Team

Actual result

m365 teams team get --id 957c8275-9c03-4746-a20a-a557202c8a1a
(node:5387) UnhandledPromiseRejectionWarning: Error: Cannot find module 'chalk'
Require stack:

  • /usr/local/lib/node_modules/@pnp/cli-microsoft365/dist/cli/Cli.js
  • /usr/local/lib/node_modules/@pnp/cli-microsoft365/dist/cli/index.js
  • /usr/local/lib/node_modules/@pnp/cli-microsoft365/dist/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Cli.closeWithError (/usr/local/lib/node_modules/@pnp/cli-microsoft365/dist/cli/Cli.js:632:23)
    at /usr/local/lib/node_modules/@pnp/cli-microsoft365/dist/cli/Cli.js:244:26
    at Array.forEach ()
    at Cli.loadAllCommands (/usr/local/lib/node_modules/@pnp/cli-microsoft365/dist/cli/Cli.js:232:15)
    at Cli.loadCommandFromFile (/usr/local/lib/node_modules/@pnp/cli-microsoft365/dist/cli/Cli.js:287:18)
    at Cli.loadCommandFromArgs (/usr/local/lib/node_modules/@pnp/cli-microsoft365/dist/cli/Cli.js:277:14)
    (Use node --trace-warnings ... to show where the warning was created)
    (node:5387) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
    (node:5387) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Environment

Versions:
CLI: 3.11.0
Node: 14.15.4
OS: MacOS Big Sur 11.4

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions