wslyvh / nexth

A Next.js + Ethereum starter kit with Viem, Wagmi, Web3Modal, SIWE, Tailwind, daisyUI and more to quickly ship production-ready Web3 Apps ⚡
https://nexth.vercel.app/
MIT License
671 stars 141 forks source link

Error about loader after npm install #20

Closed btc520 closed 1 year ago

btc520 commented 1 year ago

Hi, I got following errors after run npm install and npm dev run, I am an entry-level player, could you please check?

error - ./node_modules/react-native/index.js Module parse failed: Unexpected token (14:7) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | | // Components

import typeof AccessibilityInfo from './Libraries/Components/AccessibilityInfo/AccessibilityInfo'; | import typeof ActivityIndicator from './Libraries/Components/ActivityIndicator/ActivityIndicator'; | import typeof Button from './Libraries/Components/Button';

wslyvh commented 1 year ago

Did you get any errors or logs from installing?

Can you try using yarn instead of npm?

And can you share which versions of yarn, NPM and nodejs do you use? Maybe also share a bit more info on your setup? Device / OS / other software?

btc520 commented 1 year ago

Hello Sir, it works with YARN!

It didn't works with NPM, and I represent the problem below

I tired to install react-native and it gave the error above.

node version v18.16.0, npm 9.5.1.

  1. npm run dev output:

    warn - ./node_modules/@wagmi/connectors/node_modules/@walletconnect/universal-provider/dist/index.es.js Module not found: Can't resolve 'react-native' in 'D:\projects\nexth\node_modules\@wagmi\connectors\node_modules\@walletconnect\universal-provider\dist' warn - ./node_modules/@wagmi/connectors/node_modules/@walletconnect/universal-provider/dist/index.es.js Module not found: Can't resolve 'react-native' in 'D:\projects\nexth\node_modules\@wagmi\connectors\node_modules\@walletconnect\universal-provider\dist'

  2. http://localhost:3000/ output:

    Unhandled Runtime Error Error: No wagmi config found. Ensure you have set up a config: https://wagmi.sh/react/config Call Stack