DEV Community

Discussion on: The Complete Guide to Full Stack Solana Development with React, Anchor, Rust, and Phantom

Collapse
 
walkre profile image
walkre • Edited

I changed "react-scripts": "5.0.0" into "react-scripts": "4.0.3" and I got the following error at Building the React app when I run npm start.
Anyone could help me?

Failed to compile.

./node_modules/@solana/wallet-adapter-base/lib/esm/signer.js 16:16
Module parse failed: Unexpected token (16:16)
File was processed with these loaders:
 * ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
|           ...sendOptions
|         } = options;
>         signers?.length && transaction.partialSign(...signers);
|         transaction = await this.signTransaction(transaction);
|         const rawTransaction = transaction.serialize();
Enter fullscreen mode Exit fullscreen mode
Collapse
 
mengni profile image
How

I followed the dowgrade instruction for all dependencies, but still got the following error:

Failed to compile.

./src/App.js
Attempted import error: 'PhantomWalletAdapter' is not exported from '@solana/wallet-adapter-wallets'.

Could someone help with this? Thanks!

Collapse
 
jdguzmans profile image
jdguzmans

@walkre I am having the same error, did you solve this?

Thread Thread
 
walkre profile image
walkre

Sadly, no.

Thread Thread
 
jdguzmans profile image
jdguzmans

with these dependencies it worked for me
...
"@solana/wallet-adapter-base": "^0.7.1",
"@solana/wallet-adapter-react": "^0.13.1",
"@solana/wallet-adapter-react-ui": "^0.6.1",
"@solana/wallet-adapter-wallets": "^0.11.3",
"@solana/web3.js": "^1.31.0",
...
"react-scripts": "4.0.3",

Thread Thread
 
walkre profile image
walkre

That worked for me too.
Thank you very much!!!