Hi, I just updated my project using npm -update @loopback/cli and lb4 update.
No errors on build but when I start I get this.
Error: No valid exports main found for 'C:\repos\new client and server\api\node_modules\uuid'
at resolveExportsTarget (internal/modules/cjs/loader.js:622:9)
at applyExports (internal/modules/cjs/loader.js:499:14)
at resolveExports (internal/modules/cjs/loader.js:548:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:654:22)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:953:27)
at Function.Module._load (internal/modules/cjs/loader.js:859:27)
at Module.require (internal/modules/cjs/loader.js:1028:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.
at Module._compile (internal/modules/cjs/loader.js:1139:30)
Is there anything simple I'm missing?
Thanks
Pls remove node_modules, run npm install, and try again.
thanks, tried that, same issue.
What do you see with npm ls uuid?
[email protected] C:\repos\new client and server\api
+-- @loopback/[email protected]
| -- [email protected]
| -- [email protected]
| -- [email protected]
+-- @loopback/[email protected]
| -- [email protected] deduped
+-- @loopback/[email protected]
| -- [email protected]
| +-- [email protected]
| | -- [email protected]
| -- [email protected]
-- [email protected]
thanks
That seems to be good. What about npm ls @loopback/context?
There was a similar issue - https://github.com/facebook/flipper/issues/1144.
I cannot reproduce it. Do you have a simple git repo?
+-- @loopback/[email protected]
| +-- @loopback/[email protected] deduped
| `-- @loopback/[email protected]
| `-- @loopback/[email protected] deduped
+-- @loopback/[email protected]
| `-- @loopback/[email protected] deduped
+-- @loopback/[email protected]
| `-- @loopback/[email protected] deduped
+-- @loopback/[email protected]
+-- @loopback/[email protected]
| `-- @loopback/[email protected] deduped
+-- @loopback/[email protected]
| `-- @loopback/[email protected]
| `-- @loopback/[email protected] deduped
+-- @loopback/[email protected]
| `-- @loopback/[email protected] deduped
+-- @loopback/[email protected]
| +-- @loopback/[email protected] deduped
| `-- @loopback/[email protected]
| `-- @loopback/[email protected] deduped
+-- @loopback/[email protected]
| `-- @loopback/[email protected] deduped
`-- @loopback/[email protected]
`-- @loopback/[email protected] deduped
thanks
Hmm, maybe you can try the following:
```sh
node
Welcome to Node.js v12.16.3.
Type ".help" for more information.
const uuid = require('@loopback/context').uuid
undefined
uuid()
'c8be5b85-cd49-490a-8e83-728686582feb'
Welcome to Node.js v13.5.0.
Type ".help" for more information.
const uuid=require('@loopback/context').uuid
Uncaught:
Error: No valid exports main found for 'C:\repos\new client and server\api\node_modules\uuid'
at resolveExportsTarget (internal/modules/cjs/loader.js:622:9)
at applyExports (internal/modules/cjs/loader.js:499:14)
at resolveExports (internal/modules/cjs/loader.js:548:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:654:22)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:953:27)
at Function.Module._load (internal/modules/cjs/loader.js:859:27)
at Module.require (internal/modules/cjs/loader.js:1028:19)
at require (internal/modules/cjs/helpers.js:72:18) {
code: 'MODULE_NOT_FOUND'
}
thanks
Node.js 13.5.0 seems to be broken. I tried 13.14.0 and 14.2.0. Both of them work.
Please note you should use Node.js even versions for production. We support Node 10, 12, and 14.
thankyou :)
Hello.
Followed everything here. Installed @loopback/content. But I'm still getting the uuid error. Can anyone help me?

See comment from Raymond re node support - 10, 12, 14 - have you tried with
ones of these versions?
On Mon, Jun 15, 2020 at 11:53 AM Raphael de Arce notifications@github.com
wrote:
Hello.
Followed everything here. But I'm still getting the uuid error. Can anyone
help me?[image: ConEmu64_7KdpAprJrK]
https://user-images.githubusercontent.com/56951197/84649612-64f50f80-af39-11ea-85c8-1ded96b493cc.png—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/strongloop/loopback-next/issues/5381#issuecomment-644056062,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEMWPSI76PJXLVDRWOWPVL3RWX4SZANCNFSM4M5DOYQQ
.
From what I've understood with his comment, he's referring to the even versions, i.e., 13.14.0, 14.2.0. I'm using 13.6.0.
Even versions as in Node.js 10, 12, 14. Node.js 13 is not supported.
Updated to node v14 now. Everything seems to be working. Thank you all for your responses.
Resolvi o meu problema com a atualização do nod para a versão 14.
Node.js 13.5.0 seems to be broken. I tried 13.14.0 and 14.2.0. Both of them work.
Please note you should use Node.js even versions for production. We support Node 10, 12, and 14.
The same issue with version 13.1.0. Upgraded to 14.5.0. That solved it. Thanks!
just update the node version to even one, then the issue will be solved.
Most helpful comment
Node.js 13.5.0 seems to be broken. I tried 13.14.0 and 14.2.0. Both of them work.
Please note you should use Node.js even versions for production. We support Node 10, 12, and 14.