trufflesuite/drizzle-legacy

Failed to compile. Module not found: Can't resolve 'drizzle'

hannahk0123 opened this issue · 4 comments

I am working on GETTING STARTED WITH DRIZZLE AND REACT and in step Set Up the Store. localhost:3000 opened correctly, but whenever I add a given code to client/src/index.js, error below comes up.

Failed to compile.
./src/index.js
Module not found: Can't resolve 'drizzle' in '/Users/****/drizzle-react-tutorial/client/src'

The code is
스크린샷 2019-08-20 오전 11 04 02

I am not sure why this error appears. Please help!
Thanks!

@hanhan0123 this could happen If drizzle isn't installed in the client folder. Can you verify it was installed there?

@cds-amal Yes, It is installed. location: /Users/****/drizzle-react-tutorial.
스크린샷 2019-08-21 오전 9 11 13

@hanhan0123, I'm unable to tell if drizzle is installed in the correct location from the image. You can verify this by the existence of this folder: /Users/****/drizzle-react-tutorial/client/node_modules/drizzle.

If that path doesn't exist, you can fix by running npm install drizzle from the client folder (/Users/****/drizzle-react-tutorial/client), and restarting your app/dev server.

If that path exists, (drizzle is installed correctly), can you please share a link to a repo so we can investigate further?

Thanks!

@cds-amal Oh, I am sorry. I misread and thought you were asking to verify if the client folder exists.
No, drizzle is not installed in Users/****/drizzle-react-tutorial/client/node_modules/drizzle.

So, here's what I did.
If I run npm install drizzle, this error shows.

npm install drizzle

When I go to that link in message, it says use npm i tar instead and I did.
Then, npm start opens up localhost:3000 automatically and successfully.
However, when I add the given code to client/src/index.js as it says in this step Set up the Store, this message below comes up.

Failed to compile.
./src/index.js
Module not found: Can't resolve 'drizzle' in '/Users/****/drizzle-react-tutorial/client/src'

I really appreciate your help!