Hi All,
I am trying to test my PCF control using the npm start watch / npm start command but its erroring out with below :
PS C:\Users\SASHI\PCFPractice> npm start watch
> pcf-project@1.0.0 start C:\Users\SASHI\PCFPractice
> pcf-scripts start "watch"
[8:13:22 pm] [start] [watch] Initializing...
[8:13:22 pm] [start] [watch] Validating manifest...
[8:13:22 pm] [start] [watch] Validating control...
[8:13:23 pm] [start] [watch] Generating manifest types...
[8:13:23 pm] [start] [watch] Generating design types...
[8:13:23 pm] [start] [watch] Compiling and bundling control...
[Webpack stats]:
Hash: 0853940db24eb6c2e5df
Version: webpack 4.42.1
Time: 1334ms
Built at: 18/06/2021 8:13:25 pm
Asset Size Chunks Chunk Names
bundle.js 7.33 KiB main [emitted] main
Entrypoint main = bundle.js
[./MyPCFControl/index.ts] 3.29 KiB {main} [built]
[8:13:25 pm] [start] [watch] Generating build outputs...
[8:13:25 pm] [start] [watch] Starting control harness...
internal/modules/cjs/loader.js:443
throw e;
^
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './v4' is not defined by "exports" in C:\Users\SASHI\PCFPractice\node_modules\pcf-start\node_modules\uuid\package.json
at throwExportsNotFound (internal/modules/esm/resolve.js:290:9)
at packageExportsResolve (internal/modules/esm/resolve.js:513:3)
at resolveExports (internal/modules/cjs/loader.js:437:36)
at Function.Module._findPath (internal/modules/cjs/loader.js:477:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:872:27)
at Function.Module._load (internal/modules/cjs/loader.js:730:27)
at Module.require (internal/modules/cjs/loader.js:957:19)
at Module.patchedRequire [as require] (C:\Users\SASHI\PCFPractice\node_modules\diagnostic-channel\dist\src\patchRequire.js:14:46)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (C:\Users\SASHI\PCFPractice\node_modules\pcf-start\generated\localfileusersettings.js:9:14)
{
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
[8:13:25 pm] [start] [watch] Failed:
[pcf-1006] [Error] pcf-start exited with code 1
(node:18268) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'compileTime' of undefined
at C:\Users\SASHI\PCFPractice\node_modules\pcf-scripts\bin\pcf-scripts.js:67:42
at Generator.next (<anonymous>)
at fulfilled (C:\Users\SASHI\PCFPractice\node_modules\pcf-scripts\bin\pcf-scripts.js:7:58)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:18268) 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:18268) [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.
As Part of troubleshooting I tried :
Run NPM Install ---- Didn't Work
rollbacked the version of PowerApps CLI version -- Run npm install ----Build the PCF control --- Run npm start ---- Still it didn't work and gave me the same error .
Any Assistance or Help is highly appreciated.