I am trying to create a sample PCF component but got stuck with the below error after running the "npm run build" command
PS F:\PCF\Glow PCF> npm run build
> pcf-project@1.0.0 build F:\PCF\Glow PCF
> pcf-scripts build
[3:23:01 pm] [build] Initializing...
[3:23:01 pm] [build] Validating manifest...
[3:23:01 pm] [build] Validating control...
[3:23:04 pm] [build] Generating manifest types...
DeprecationWarning: 'createInterfaceDeclaration' has been deprecated since v4.8.0. Decorators are no longer supported for this function. Callers should switch to an overload that does not accept a 'decorators' parameter.
[3:23:05 pm] [build] Generating design types...
[3:23:05 pm] [build] Running ESLint...
[3:23:07 pm] [build] Compiling and bundling control...
[Webpack stats]:
asset bundle.js 3.75 KiB [compared for emit] (name: main)
./GlowingTextComponent1707/index.ts 39 bytes [built] [code generated]
ERROR in ./GlowingTextComponent1707/index.ts
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Cannot find module 'ajv/dist/compile/codegen'
Require stack:
- F:\PCF\Glow PCF\node_modules\ajv-keywords\dist\definitions\typeof.js
- F:\PCF\Glow PCF\node_modules\ajv-keywords\dist\keywords\typeof.js
- F:\PCF\Glow PCF\node_modules\ajv-keywords\dist\keywords\index.js
- F:\PCF\Glow PCF\node_modules\ajv-keywords\dist\index.js
- F:\PCF\Glow PCF\node_modules\schema-utils\dist\validate.js
- F:\PCF\Glow PCF\node_modules\schema-utils\dist\index.js
- F:\PCF\Glow PCF\node_modules\babel-loader\lib\index.js
- F:\PCF\Glow PCF\node_modules\loader-runner\lib\loadLoader.js
- F:\PCF\Glow PCF\node_modules\loader-runner\lib\LoaderRunner.js
- F:\PCF\Glow PCF\node_modules\webpack\lib\NormalModuleFactory.js
- F:\PCF\Glow PCF\node_modules\webpack\lib\Compiler.js
- F:\PCF\Glow PCF\node_modules\webpack\lib\webpack.js
- F:\PCF\Glow PCF\node_modules\webpack\lib\index.js
- F:\PCF\Glow PCF\node_modules\pcf-scripts\tasks\compileTask.js
- F:\PCF\Glow PCF\node_modules\pcf-scripts\taskGroup.js
- F:\PCF\Glow PCF\node_modules\pcf-scripts\bin\pcf-scripts.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at Module.patchedRequire (F:\PCF\Glow PCF\node_modules\diagnostic-channel\dist\src\patchRequire.js:16:46)
at Module.Hook._require.Module.require (F:\PCF\Glow PCF\node_modules\require-in-the-middle\index.js:167:34)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (F:\PCF\Glow PCF\node_modules\ajv-keywords\dist\definitions\typeof.js:3:19)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
webpack 5.88.1 compiled with 1 error in 3275 ms
[pcf-scripts] [Error] encountered unexpected error:
Error: An error occurred compiling or bundling the control.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pcf-project@1.0.0 build: `pcf-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pcf-project@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\chait\AppData\Roaming\npm-cache\_logs\2023-07-17T09_53_13_035Z-debug.log
I tried the below things but had no luck
npm install --save-dev typescript
npm install -g typescript
npm i -g
"devDependencies": {
"pcf-scripts": "^1",
"pcf-start": "^1"
}Package.json

Report
All responses (
Answers (