cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sashi
Regular Visitor

PCF - NPM START WATCH Erroring Out with [8:13:25 pm] [start] [watch] Failed: [pcf-1006] [Error] pcf-start exited with code 1

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.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
DianaBirkelbach
Super User
Super User

Hi @Sashi , 

 

It's a known issue with the pac cli 1.7.2.

Try using an older version of the pcf-start:

npm install pcf-start@1.6.5

After that, using "npm list" you shoudn't see "uuid" version 8.3.2 in the list anymore.

 

You would need to revert this change when a new "pac cli" will be available, by using: 

npm install pcf-start@latest


Hope it helps!

Diana

 

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

4 REPLIES 4
DianaBirkelbach
Super User
Super User

Hi @Sashi , 

 

It's a known issue with the pac cli 1.7.2.

Try using an older version of the pcf-start:

npm install pcf-start@1.6.5

After that, using "npm list" you shoudn't see "uuid" version 8.3.2 in the list anymore.

 

You would need to revert this change when a new "pac cli" will be available, by using: 

npm install pcf-start@latest


Hope it helps!

Diana

 

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

HemantG
Power Apps
Power Apps

This should be fixed with the latest update on the pac CLI which has the hotfix for this issue 

>> pac install latest

>> pac use latest

1.7.3 (Latest)

 

revert if you have made change to package.json for pcf-start 

    "pcf-start""^1"

 

>> npm install pcf-start@latest

Let me know if there are any questions. 

Thanks,

Hemant 

Hi Diana,

 

My pac cli version is 1.9.4

The solution is not working in my case. Showing the same error after installing pcf-start@1.6.5 

 

DianaBirkelbach
Super User
Super User

Hi @yusuffbasha , 

With 1.9.4 should work.

Is it exactly the same error message as above, containing "Package subpath './v4' is not defined by "exports" in"?

Lately there are some issues with the typescript dependecy, so maybe it's another issue?

 

 

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,596)