solana-developers / create-solana-dapp

CLI for creating Solana dApps on the fly
https://npmjs.com/package/create-solana-dapp
MIT License
363 stars 108 forks source link

TypeError: WorkspaceContext is not a constructor #81

Closed neocarvajal closed 2 months ago

neocarvajal commented 2 months ago

Failed to apply preset: @solana-developers/preset-react

Error after executing create-solana-dapp

Captura de pantalla 2024-09-09 a la(s) 5 40 24 p  m

beeman commented 2 months ago

Hi @neocarvajal, thanks for creating this issue!

I've not been able to reproduce this issue locally. However, I just switched some of the tags on NPM so the latest version now points to 3.1.0 instead of 3.0.1.

Could you try it again using the latest?

One thing I noted is that you're on Node v21. It is generally recommended to skip any odd Node versions and only use the even ones. Using an odd version might affect how your apps are running. image

neocarvajal commented 2 months ago

Thanks for replying, my version is an update from February this year (node v21.6.2), maybe it can be that issue that it is not the latest. My work computer is a 2009 Macbook and my system does not allow me to be on the latest version of node although it seems to me that it is not that old.

Captura de pantalla 2024-09-12 a la(s) 9 47 13 p  m

beeman commented 2 months ago

Thanks for replying, my version is an update from February this year (node v21.6.2), maybe it can be that issue that it is not the latest. My work computer is a 2009 Macbook and my system does not allow me to be on the latest version of node although it seems to me that it is not that old.

Captura de pantalla 2024-09-12 a la(s) 9 47 13 p m

The problem is not if it's old or not, you're using an odd version (21.x) and should probably stick to even versions (20 or 22).

If you can run this version on your computer, you'll also be able to run v20 or v22.

The Node site recently got updated and there's a nice version picker now

https://nodejs.org/en/download/package-manager

As you will see, it will default to an even version, not an odd one. image

Anyway, I'll close this issue for now. If you keep having problems with create-solana-dapp after using a stable release, please feel free to post a reply with a log of the terminal output that you see.