With [email protected]and [email protected] I get this require error. It seems likely that this relates to #1001 and #998. We are getting this error in multiple projects. cc @lencioni
Cannot find module 'uuid/v4' from 'Utils.js'
npm ls uuidโโโฌ [email protected]
โ โโโฌ [email protected]
โ โโโฌ [email protected]
โ โโโฌ [email protected]
โ โโโฌ [email protected]
โ โโโ [email protected]
โโโฌ [email protected]
โ โโโ [email protected]
โโโฌ [email protected]
โ โโโฌ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โโโฌ [email protected]
โ โโโฌ [email protected]
โ โโโ [email protected] deduped
โโโฌ [email protected]
โโโฌ [email protected]
โโโ [email protected]
If I manually change the Utils.js file from require('uuid/v4') to require('uuid').v4 then it works.
I'm not sure why https://unpkg.com/[email protected]/v4.js wouldn't work if it's truly at v3.1.0. Can you verify that node_modules/enzyme/node_modules/uuid/v4.js exists, and that node_modules/enzyme/node_modules/uuid/package.json is at v3.1.0?
I'm not sure why either. Yes the v4 file exists and that package path is v3.1.0
I confirmed this same error on node 7.10.0 and 8.1.3 and on npm 4.2.0 and npm 5.0.3
Same error!
Old version of uuid may be pinned in node_modules and will be used by webpack or other bundle tools, although new version is installed in enzyme/node_modules.
I fixed this error by npm install uuid --save to replace the old version in node_modules.
Cool same we're now using npm install uuid@^3.1 --save-dev to fix this error on 3 projects that use [email protected]. All 3 use npm@^5.2 as of today. 2 use webpack and 1 uses rollup.
I don't think this is relevant any more now that we're on v3.
Most helpful comment
Cool same we're now using
npm install uuid@^3.1 --save-devto fix this error on 3 projects that use[email protected]. All 3 usenpm@^5.2as of today. 2 use webpack and 1 uses rollup.