gaearon / react-hot-boilerplate

Minimal live-editing example for React
MIT License
3.91k stars 879 forks source link

Build fails out of the box on Windows #75

Open tobiasmuehl opened 8 years ago

tobiasmuehl commented 8 years ago

I'm on Windows 10 x64 and can't get the boilerplate to run.

Error on master branch

on commit c7a808185b372a27dfe5758b340578c95922f74e

git clone git@github.com:gaearon/react-hot-boilerplate.git
cd react-hot-boilerplate
npm i
npm start
ERROR in multi main
Module not found: Error: Cannot resolve module 'react-hot-loader/patch' in D:\Work\OriginalOrCopy\react-hot-boilerplate
 @ multi main
ERROR in ./src/index.js
Module parse failed: D:\Work\OriginalOrCopy\react-hot-boilerplate\src\index.js Unexpected token (5:16)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (5:16)
    at Parser.pp.raise (C:\d\Work\OriginalOrCopy\react-hot-boilerplate\node_modules\webpack\node_modules\acorn\dist\acorn.js:920:13)
    at Parser.pp.unexpected (C:\d\Work\OriginalOrCopy\react-hot-boilerplate\node_modules\webpack\node_modules\acorn\dist\acorn.js:1483:8)
    at Parser.pp.parseExprAtom (C:\d\Work\OriginalOrCopy\react-hot-boilerplate\node_modules\webpack\node_modules\acorn\dist\acorn.js:330:12)
    at Parser.pp.parseExprSubscripts (C:\d\Work\OriginalOrCopy\react-hot-boilerplate\node_modules\webpack\node_modules\acorn\dist\acorn.js:225:19)
    at Parser.pp.parseMaybeUnary (C:\d\Work\OriginalOrCopy\react-hot-boilerplate\node_modules\webpack\node_modules\acorn\dist\acorn.js:204:17)
    at Parser.pp.parseExprOps (C:\d\Work\OriginalOrCopy\react-hot-boilerplate\node_modules\webpack\node_modules\acorn\dist\acorn.js:151:19)
    at Parser.pp.parseMaybeConditional (C:\d\Work\OriginalOrCopy\react-hot-boilerplate\node_modules\webpack\node_modules\acorn\dist\acorn.js:133:19)
    at Parser.pp.parseMaybeAssign (C:\d\Work\OriginalOrCopy\react-hot-boilerplate\node_modules\webpack\node_modules\acorn\dist\acorn.js:110:19)
    at Parser.pp.parseExprList (C:\d\Work\OriginalOrCopy\react-hot-boilerplate\node_modules\webpack\node_modules\acorn\dist\acorn.js:657:23)
    at Parser.pp.parseSubscripts (C:\d\Work\OriginalOrCopy\react-hot-boilerplate\node_modules\webpack\node_modules\acorn\dist\acorn.js:249:29)

(Full log here)

Same thing happens on version 3-alpha

on commit f134ff335d26f1b0369e65a9309b4ec1a38a2581

ERROR in multi main
Module not found: Error: Cannot resolve module 'react-hot-loader/patch' in D:\Work\OriginalOrCopy\react-hot-boilerplate
 @ multi main
ERROR in ./src/index.js
Module parse failed: D:\Work\OriginalOrCopy\react-hot-boilerplate\src\index.js Unexpected token (8:2)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (8:2)
    at Parser.pp.raise (C:\d\Work\OriginalOrCopy\react-hot-boilerplate\node_modules\webpack\node_modules\acorn\dist\acorn.js:920:13)
    at Parser.pp.unexpected (C:\d\Work\OriginalOrCopy\react-hot-boilerplate\node_modules\webpack\node_modules\acorn\dist\acorn.js:1483:8)
    at Parser.pp.parseExprAtom (C:\d\Work\OriginalOrCopy\react-hot-boilerplate\node_modules\webpack\node_modules\acorn\dist\acorn.js:330:12)
    at Parser.pp.parseExprSubscripts (C:\d\Work\OriginalOrCopy\react-hot-boilerplate\node_modules\webpack\node_modules\acorn\dist\acorn.js:225:19)
    at Parser.pp.parseMaybeUnary (C:\d\Work\OriginalOrCopy\react-hot-boilerplate\node_modules\webpack\node_modules\acorn\dist\acorn.js:204:17)
    at Parser.pp.parseExprOps (C:\d\Work\OriginalOrCopy\react-hot-boilerplate\node_modules\webpack\node_modules\acorn\dist\acorn.js:151:19)
    at Parser.pp.parseMaybeConditional (C:\d\Work\OriginalOrCopy\react-hot-boilerplate\node_modules\webpack\node_modules\acorn\dist\acorn.js:133:19)
    at Parser.pp.parseMaybeAssign (C:\d\Work\OriginalOrCopy\react-hot-boilerplate\node_modules\webpack\node_modules\acorn\dist\acorn.js:110:19)
    at Parser.pp.parseExprList (C:\d\Work\OriginalOrCopy\react-hot-boilerplate\node_modules\webpack\node_modules\acorn\dist\acorn.js:657:23)
    at Parser.pp.parseSubscripts (C:\d\Work\OriginalOrCopy\react-hot-boilerplate\node_modules\webpack\node_modules\acorn\dist\acorn.js:249:29)

Full log here

equicolor commented 8 years ago

I get same error

flcl42 commented 8 years ago

Very weird: got same error Module parse failed: D:\sandbox\react-hot-boilerplate\src\index.js while trying debug from VS Code (internally it runs node like --debug-brk=12312 server.js and connects to debugger), but if I run from console it works fine.

Windows 8, node 6.2.2.

Marshian commented 8 years ago

I get the same error if I use node 6.0.0 or greater on Windows 8.1

I believe it's an issue with babel, as I've seen the same behavior in other projects. Something is wrong with parsing the JSX. Node 5.12.0 works without issues however.

myleschuahiock commented 8 years ago

I get exactly the same error. I'm using Node 6.2.2.

EDIT Re-installed Node 6.2.2 and now it's working fine. Weird

simeg commented 8 years ago

I get the same error on Mac using node 6.3.1 and npm 3.10.3. I have tried re-installing both node and npm multiple times without success. I tried changing to node 6.2.2 without success.

doomietrue commented 8 years ago

The same error, Windows 7, node 6.0.0 and npm 3.8.6

uripre commented 8 years ago

Same error. Windows 10, node 6.4.0, npm 3.3.12.

ifElser commented 7 years ago

same error in Ubuntu server 14.04 LTS, node v7.2.0, webpack 2.1.0-beta.26 ` ERROR in multi main Module not found: Error: Can't resolve 'react-hot-loader/patch' in '/home/elser/node/projects/publicsonar/react-test-app/development/source'

@ multi main `

unional commented 7 years ago

Updating node to v6.9.1 fixed the issue for me

calesce commented 7 years ago

Are people still seeing this on master or next branches?

ijscoman1337 commented 7 years ago

When trying to run NPM Start

ERROR in ./src/index.js Module build failed: TypeError: [BABEL] /Users/j/Code/React/scoreboard/src/index.js: Invalid options type for /Users/j/Code/React/scoreboard/node_modules/babel-preset-airbnb/index.js

calesce commented 7 years ago

@ijscoman1337 we don't use babel-preset-airbnb, not sure where that's coming from.