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

when I run the project , there is an error, how to fix it? #15

Closed 256yangwei closed 1 year ago

256yangwei commented 1 year ago

PS D:\projects\js_projects\nexth> npm run dev

nexth@0.1.0 dev next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000 error - ./src/pages/_app.tsx:3:0 Module not found: Can't resolve 'components/layout/Layout' 1 | import type { AppProps } from 'next/app' 2 | // import { Layout } from 'components/layout'

3 | import { Layout } from 'components/layout/Layout' 4 | import { Web3Provider } from 'providers/Web3' 5 | import { ChakraProvider } from 'providers/Chakra' 6 | import { useIsMounted } from 'hooks/useIsMounted'

https://nextjs.org/docs/messages/module-not-found wait - compiling... error - ./src/pages/_app.tsx:2:0 Module not found: Can't resolve 'components/layout' 1 | import type { AppProps } from 'next/app'

2 | import { Layout } from 'components/layout' 3 | // import { Layout } from 'components/layout/Layout' 4 | import { Web3Provider } from 'providers/Web3' 5 | import { ChakraProvider } from 'providers/Chakra'

https://nextjs.org/docs/messages/module-not-found

image

wslyvh commented 1 year ago

Did you install everything successfully?

Please run yarn or npm install first. Then you can run yarn dev or npm run dev

256yangwei commented 1 year ago

I run npm install first, then run npm run dev,but the the error still exists. image

256yangwei commented 1 year ago

Which version of Node.js, npm, and yarn is used in the project?

wslyvh commented 1 year ago

yarn -v 1.22.18 npm -v 8.15.0 node -v v16.17.1

I usually prefer yarn over npm. Can you see if that work? Otherwise share a bit more a bit more on your setup? Device / OS / software versions?

wslyvh commented 1 year ago

Someone else seemed to have a similar issues that was solved by switching to yarn See #20

Closing issue