cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FlorianGrimm
Frequent Visitor

npm run start watch uuid/v4

Hi 

Today I'm programming on an other computer. I don't know what's the different to my old computer.

 

If I run

npm run start watch

 

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './v4' is not defined by "exports" in ...\node_modules\uuid\package.json.

 

In the files

...\node_modules\pcf-start\generated\localfileusersettings.js

...\node_modules\pcf-start\generated\telemetry.js

I replace

 var uuidv4 = require('uuid/v4');

with

try {
    var uuidv4 = require('uuid/v4');
catch (error) {
    var { v4uuidv4 } = require('uuid');
}
 
and it worked again.
 
May be someone have a idea what I have installed wrong.
txs Flori
2 REPLIES 2
DianaBirkelbach
Super User
Super User

Hi @FlorianGrimm , 

 

In the uuid npm package, it seems that deep requires are deprecated with version 7 (https://www.npmjs.com/package/uuid#deep-requires-no-longer-supported)

 

But the PCF seems to use uuid version "^3.3.2" (if I see this right in the "node_modules/pcf-scripts/package.json") , which means that it might install until uuid v3.4.0. In th v3.* where the deep requires were supported: https://www.npmjs.com/package/uuid/v/3.3.2

 

It seems to me that it's using the latest version of uuid, but I'm not sure why. If you say, it's only on another computer, I would think on global install of uuid with a newer version, but I have no idea why the local install is not taken.

 

Maybe you can use "npm list" and check which version of uuid is used.

 

Hope it helps!

Kind regards,

Diana

 

Hi

 

it seems jest does this to me...

+-- jest@26.6.3
| +-- @jest/core@26.6.3
| | +-- @jest/console@26.6.2
| | +-- @jest/reporters@26.6.2
| | | +-- node-notifier@8.0.0
| | | | +-- uuid@8.3.1
| | +-- jest-config@26.6.3
| | | +-- jest-environment-jsdom@26.6.2
| | | | +-- jest-util@26.6.2 deduped
| | | | `-- jsdom@16.4.0
| | | |   +-- request@2.88.2
| | | |   | `-- uuid@3.4.0
| +-- awesome-typescript-loader@5.2.1
| | +-- chalk@2.4.2
| | `-- webpack-log@1.2.0
| |   `-- uuid@3.4.0
| +-- uuid@3.4.0
+-- pcf-start@1.4.4
| +-- live-server@1.2.1
| | +-- http-auth@3.1.3
| | | `-- uuid@3.4.0

so I used 

npm install uuid@^3.3.2 --save-dev

the mysteries of node_modules .. I will (want) never understand

 

txs for the hint

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Users online (28,171)