brownie-mix / react-mix

Everything you need to use React with Brownie!
62 stars 19 forks source link

map.json on client side #4

Closed benjiqq closed 3 years ago

benjiqq commented 4 years ago

I had this issue before, not quite sure what's the cause. running deploy does not produce a map.json which the client is looking for

Failed to compile
./src/App.js
Module not found: Can't resolve './artifacts/deployments/map.json' in '/Users/x/client/src'

quote from @matnad

The map is updated by brownie when loading or closing a session.
You can specify the location of the build folder in the config file.
Build being gitignored is intentional, all build artifacts will be created when a session is started
In the react-mix the build folder is set to client/src/artifacts/ (check the brownie-config.yaml) since react requires that all import are within its src directory
PatrickAlphaC commented 3 years ago

Are you still getting this issue?

PatrickAlphaC commented 3 years ago

Closing due to inactivity

SJDunkelman commented 1 year ago

Getting same error (node v16.18.1, npm v8.19.2)

UMOJAVERSE commented 1 year ago

well I'm getting the same error how do I resolve it?

Module not found: Can't resolve '../artifacts/deployments/map.json' in '/home/oduol/Pictures/medrecord/gritk/client/src/Records'

saguillo2000 commented 1 year ago

I erased the client folder and executed the following react init:

npx create-react-app client --template typescript