microsoft / microsoft/powerplatform-vscode

PCF build fail with issue " Error: Cannot find module 'node:os'"

Open
#967 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
277
Forks
60
Avg merge
1d 1h
Merged PRs (30d)
14

Description

Node vesion -15.13.0

Steps followed - https://learn.microsoft.com/en-us/power-apps/developer/component-framework/create-custom-controls-using-pcf

`PS C:\Users\XXXXXXXX> npm run build

XXXXX@1.0.0 build
pcf-scripts build

node:internal/modules/cjs/loader:927
throw err;
^

Error: Cannot find module 'node:os'
Require stack:

  • C:\Users\XXXXXXX\node_modules@azure\logger\dist\commonjs\log.js
  • C:\Users\XXXXXXX\node_modules@azure\logger\dist\commonjs\debug.js
  • C:\Users\XXXXXXX\node_modules@azure\logger\dist\commonjs\index.js
  • C:\Users\XXXXXXX\node_modules@azure\core-rest-pipeline\dist\index.js
  • C:\Users\XXXXXXX\node_modules\applicationinsights\out\Library\AuthorizationHandler.js
  • C:\Users\XXXXXXX\node_modules\applicationinsights\out\Library\TelemetryClient.js
  • C:\Users\XXXXXXX\node_modules\applicationinsights\out\Library\NodeClient.js
  • C:\Users\XXXXXXX\node_modules\applicationinsights\out\applicationinsights.js
  • C:\Users\XXXXXXX\node_modules\pcf-scripts\generated\telemetry\apptelemetryclient.js
  • C:\Users\XXXXXXX\node_modules\pcf-scripts\bin\pcf-scripts.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:924:15)
    at Function.Module._load (node:internal/modules/cjs/loader:769:27)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at Module.patchedRequire [as require] (C:\Users\XXXXXXX\node_modules\diagnostic-channel\dist\src\patchRequire.js:16:46)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object. (C:\Users\XXXXXXX\node_modules@azure\logger\dist\commonjs\log.js:7:19)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'XXXXXXX\node_modules\@azure\logger\dist\commonjs\log.js',
    'XXXXXXX\node_modules\@azure\logger\dist\commonjs\debug.js',
    'XXXXXXX\node_modules\@azure\logger\dist\commonjs\index.js',
    'XXXXXXX\node_modules\@azure\core-rest-pipeline\dist\index.js',
    'XXXXXXX\node_modules\applicationinsights\out\Library\AuthorizationHandler.js',
    'XXXXXXX\node_modules\applicationinsights\out\Library\TelemetryClient.js',
    'XXXXXXX\node_modules\applicationinsights\out\Library\NodeClient.js',
    'XXXXXXX\node_modules\applicationinsights\out\applicationinsights.js',
    'XXXXXXX\node_modules\pcf-scripts\generated\telemetry\apptelemetryclient.js',
    'XXXXXXX\node_modules\pcf-scripts\bin\pcf-scripts.js'
    ]
    }`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce npm run build with Node 15.13.0 and inspect the pcf-scripts entry point plus the @azure/logger files shown in the stack trace. Determine whether the failure is in the build tooling or its supported Node-version range; done means identifying a repository-level fix or documenting the confirmed compatibility requirement.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.