Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error on yarn create r3f-app next my-app -ts #146

Open
bstro opened this issue Oct 23, 2023 · 5 comments
Open

error on yarn create r3f-app next my-app -ts #146

bstro opened this issue Oct 23, 2023 · 5 comments

Comments

@bstro
Copy link

bstro commented Oct 23, 2023

Upon running yarn create r3f-app next my-app -ts per the docs yields the following error:

Error: create-r3f-app tried to access semver, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Full output:

➤ YN0000: · Yarn 4.0.0
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + create-r3f-app@npm:1.6.8, @ampproject/remapping@npm:2.2.1, @babel/code-frame@npm:7.22.13, @babel/compat-data@npm:7.23.2, and 315 more.
➤ YN0000: └ Completed in 1s 679ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ 319 packages were added to the project (+ 29.93 MiB).
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0000: └ Completed
➤ YN0000: · Done with warnings in 2s 62ms

/private/var/folders/fr/g4k50xt53x50ymkb71cr551r0000gn/T/xfs-33816afa/dlx-49456/.pnp.cjs:9092
      Error.captureStackTrace(firstError);
            ^

Error: create-r3f-app tried to access semver, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: semver
Required by: create-r3f-app@npm:1.6.8 (via /private/var/folders/fr/g4k50xt53x50ymkb71cr551r0000gn/T/xfs-33816afa/dlx-49456/.yarn/cache/create-r3f-app-npm-1.6.8-d4d1ca0ded-ef12dd8092.zip/node_modules/create-r3f-app/lib/utils/)

Require stack:
- /private/var/folders/fr/g4k50xt53x50ymkb71cr551r0000gn/T/xfs-33816afa/dlx-49456/.yarn/cache/create-r3f-app-npm-1.6.8-d4d1ca0ded-ef12dd8092.zip/node_modules/create-r3f-app/lib/utils/check-for-update.js
- /private/var/folders/fr/g4k50xt53x50ymkb71cr551r0000gn/T/xfs-33816afa/dlx-49456/.yarn/cache/create-r3f-app-npm-1.6.8-d4d1ca0ded-ef12dd8092.zip/node_modules/create-r3f-app/lib/index.js
- /private/var/folders/fr/g4k50xt53x50ymkb71cr551r0000gn/T/xfs-33816afa/dlx-49456/.yarn/cache/create-r3f-app-npm-1.6.8-d4d1ca0ded-ef12dd8092.zip/node_modules/create-r3f-app/bin/create-r3f-app

Node.js v21.0.0
Yarn 4.0.0

@takavfx
Copy link

takavfx commented Oct 31, 2023

Same issues with Node.js v18.17.1 and Yarn v4.0.1.

@ashleymvanduzer
Copy link

ashleymvanduzer commented Nov 28, 2023

@takavfx @bstro using npm works (im using node 21.2.0) : npm create r3f-app next my-app -ts

@brandonreid
Copy link

@ashleymvanduzer 's suggestion worked for me, but only with tailwind, not styled unfortunately.

@Bluhurr
Copy link

Bluhurr commented Feb 28, 2024

I'm seeing the same issue, with Yarn v4.0.2 and Node.js v21.6.2 (I also just updated yarn and node to latest, and had the same issue with older versions of both).

Seems like the error comes from Yarn's PnP. I wish there was some way to turn that off during this create command, to see if that helps.

I was also able to use npm and get it to work with that, but nothing looks to be TypeScript? Everything is still .js, not sure if that's unrelated to using npm though.

[Edit]: The command npx create-r3f-app next 3d-trading-cards-demo --typescript worked and DID generate ts files properly. Not sure why it didn't work with npm.

@ashleymvanduzer
Copy link

@Bluhurr nice, I had been meaning to try that, had a feeling npx would be the best option for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants