gltfjsx: CLI.js shows 'read-pkg-up' error [ERR_MODULE_NOT_FOUND]

This error happens when I try to run the npx command to convert the gltf file into jsx. My current node version is v20.5.1 and npm version is 9.8.1. I have also installed gltfjsx package to my node modules.

image

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Reactions: 1
  • Comments: 16

Commits related to this issue

Most upvoted comments

I mixed @nathaponb + @MatiasMontoto and #201 (comment) to solve. The result is:

“dependencies”: { “gltfjsx”: “^6.2.11”, “read-pkg-up”: “^10.0.0”, “sharp”: “^0.32.5”,

I didn’t have success using NPM, so I used Yarn and worked 😃

I mixed @nathaponb + @MatiasMontoto and #201 (comment) to solve. The result is:

“dependencies”: { “gltfjsx”: “^6.2.11”, “read-pkg-up”: “^10.0.0”, “sharp”: “^0.32.5”,

I didn’t have success using NPM, so I used Yarn and worked 😃

Amazing! I have been stuck on this forever and it worked, thank you

I used npm to install those three packages. Also currently on node v19.6.1

npm i gltfjsx read-pkg-up sharp

I used npm to install those three packages. Also currently on node v19.6.1

npm i gltfjsx read-pkg-up sharp

That also did the trick for me using pnpm on node: v18.16.0

Thank you

my solution that worked for node v18.17.0 :

npm install read-pkg-up

that’s it it works perfectly now.

Have you tried running npm install read-pkg-up in your node_modules parent directory (srdtu-revamp for you)? I had the same issue, and I solved it that way.

Switch to node 16 (16.20.2) install gltfjsx globally npm install -g gltfjsx gltfjsx ./model.gltf -t