pmndrs / gltfjsx

🎮 Turns GLTFs into JSX components
https://gltf.pmnd.rs
MIT License
4.7k stars 309 forks source link

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'read-pkg-up' imported from /Users/theholygrail/.npm/_npx/16b3f312213fced0/node_modules/gltfjsx/cli.js #222

Closed solo-daemon closed 1 year ago

solo-daemon commented 1 year ago
theholygrail@Amrits-MacBook-Pro resources % npx gltfjsx amrit.glb   
node:internal/errors:496
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'read-pkg-up' imported from /Users/theholygrail/.npm/_npx/16b3f312213fced0/node_modules/gltfjsx/cli.js
    at new NodeError (node:internal/errors:405:5)
    at packageResolve (node:internal/modules/esm/resolve:887:9)
    at moduleResolve (node:internal/modules/esm/resolve:936:20)
    at defaultResolve (node:internal/modules/esm/resolve:1129:11)
    at nextResolve (node:internal/modules/esm/loader:163:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:835:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:77:40)
    at link (node:internal/modules/esm/module_job:76:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}

Node.js v18.17.0

Here's the error Can you help me with this

solo-daemon commented 1 year ago

Found out this can be solve with

npm install -g gltfjsx npm install -g read-pkg-up

then run , gltfjsx amrit.glb

vannvan commented 1 year ago

Found out this can be solve with

npm install -g gltfjsx npm install -g read-pkg-up

then run , gltfjsx amrit.glb

I think read-pkg-up should be included in the dependencies

solo-daemon commented 1 year ago

Yeah it should be but there other issues opened adressing this same thing but the maintainers aren't responding. Maybe they will respond soon.