trouble with webpack
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, react, webpack
- Domain
- build-system, frontend
Research direction
Start with the webpack configuration and the failing import in react-geocoder/index.js, using static/app/scripts/components/ListProperty/ListPropertyLocationField.jsx and static/app/scripts/main.js as the reproduction path. Run the reported webpack build and verify that importing react-geocoder compiles without the module parse error; no specific test is mentioned.
Written by the indexing model from the issue text.
Description
I'm using webpack (with babel-loader), and get this error when I import react-geocoder:
ERROR in ./~/react-geocoder/index.js
Module parse failed: /Users/me/project/node_modules/react-geocoder/index.js Line 9:
Unexpected token (
You may need an appropriate loader to handle this file type.
| */
| var Geocoder = React.createClass({
| getDefaultProps() {
| return {
| endpoint: 'https://api.tiles.mapbox.com',
@ ./static/app/scripts/components/ListProperty/ListPropertyLocationField.jsx 25:21-46
This is most likely a webpack config problem, but I'm hoping someone here knows how to help. My webpack config:
var config = {
entry: './static/app/scripts/main.js',
output: {
path: __dirname,
filename: 'main.js'
},
debug : isDev,
module: {
loaders: [{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel'
}]
}
};
- Dominant language
- JavaScript
- Stars
- 136
- Forks
- 61
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mapbox/react-geocoder
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
mapbox/react-geocoder#29 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
mapbox/react-geocoder#28 · 7 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
mapbox/react-geocoder#25 · 6 comments · 12 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
mapbox/react-geocoder#23 ·
All issues in mapbox/react-geocoder
Similar issues
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
AllTheMods/ATM-10-L#19 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
SignalK/n2k-signalk#345 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
JuliaPluto/PlutoPlotly.jl#72 ·