mapbox / mapbox/mapbox-gl-directions
Error: Can't resolve 'fs'
- Dominant language
- JavaScript
- Stars
- 255
- Forks
- 130
- PR merge metrics
- No merged PRs in 30d
Description
I have a problem with my webpack/react system and I am trying to run the mapbox-gl with mapbox-gl-directions, but I am stuck with this error with the 'fs' that is a dependency of this projects.
ERROR in ./node_modules/@mapbox/mapbox-gl-directions/src/controls/inputs.js
Module not found: Error: Can't resolve 'fs' in '/home/tadeu/Projects/lisbon-cycle/node_modules/@mapbox/mapbox-gl-directions/src/controls'
@ ./node_modules/@mapbox/mapbox-gl-directions/src/controls/inputs.js 6:9-22
@ ./node_modules/@mapbox/mapbox-gl-directions/src/directions.js
@ ./node_modules/@mapbox/mapbox-gl-directions/src/index.js
@ ./src/Map/index.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.js
Contributor guide
Research direction
Start with node_modules/@mapbox/mapbox-gl-directions/src/controls/inputs.js and trace the import path shown through src/directions.js, src/index.js, src/Map/index.js, and src/index.js. Reproduce the webpack build error and determine what change is needed so the React application resolves the fs dependency and builds successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react, webpack
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100