Create-react-app: Fresh Install, Yarn Start and then....Nothing

Created on 31 Mar 2017  路  17Comments  路  Source: facebook/create-react-app

1.) Fresh install of create-react-app
2.) ran create-react-app project_name
3.) yarn start (compiled successfully, running on localhost:3000)
4.) blank/empty white screen with JS error

  • Uncaught SyntaxError: Invalid regular expression: missing / (same error but sometimes points to it being in bundle.js file and sometimes in bootstrap file)

I've tried removing node_modules and npm install. Any other ideas?

Mac 10.11.4 El Capitan
node: v7.8.0
npm: 4.4.4

underlying tools

Most helpful comment

@aikar * is shorter and has meaning.

Anyway, I don't think we should try to badger @echezbro about something this trivial. 馃槄

I'm glad it's working now and hopefully we can improve our (or all) JS tooling to support any use case, no matter how seldom used.

@echezbro Please let us know if you run into any other issues. We are always here to answer questions, too! 馃槃

All 17 comments

Did you make any changes to the source files before running start? A freshly generated application works for me. I tested on Node 7.8.0 and 6.10.0.
And can you post a more detailed error? There's not much we can do to help with the little information you provided.

Thanks @Timer.

I didn't change any source files. What else, other than content below, is helpful to provide?

Error points to this line of bundle.js:

module.exports = __webpack_require__(/! /Users/EMC/Desktop//Code/testing-react/src/index.js */88);


package.json file:
{
"name": "testing-react",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^15.4.2",
"react-dom": "^15.4.2"
},
"devDependencies": {
"babel-plugin-add-module-exports": "^0.2.1",
"react-scripts": "0.9.5"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}

You must have changed something, what is babel-plugin-add-module-exports there for?

Saw a User mentioned that as a potential solution to what looked like a similar issue. Removed it and still getting same error.

What browser are you using?
Can you please upload a reproducible demo, otherwise there's nothing further we can do.

Chrome 56.
Recorded a short screencast showing what's happening here: https://youtu.be/10ztaMOLHcc

Looks like a webpack bug, webpack can't handle paths with a directory named * in them (webpack doesn't escaping paths). As a temporary work around, switch directories.

Can you please try [email protected] to see if this is still reproducing?

Solved! You're the man. Didn't think the path would be a problem as all my Rails apps work without any path related issues.

Did 0.10 solve it or changing directories?

Directories.

Closing this since I reported it upstream: https://github.com/webpack/webpack/issues/4611. And this is a super rare issue. 馃槄

@echezbro why did you name your folder that?

To each his own I guess.
Seems dangerous, when I went to delete it I almost did rm *, luckily caught myself. 馃槄 Used macOS finder instead haha.

I enjoy a clean desktop, so I have my many folders inside an all encompassing "*" folder. Hadn't been an issue until this..

Odd, I would imagine most watchers would break with *, esp. anything webpack related.

@echezbro my question was why did you choose '*' instead of say 'projects'

@aikar * is shorter and has meaning.

Anyway, I don't think we should try to badger @echezbro about something this trivial. 馃槄

I'm glad it's working now and hopefully we can improve our (or all) JS tooling to support any use case, no matter how seldom used.

@echezbro Please let us know if you run into any other issues. We are always here to answer questions, too! 馃槃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Evan-GK picture Evan-GK  路  3Comments

barcher picture barcher  路  3Comments

xgqfrms-GitHub picture xgqfrms-GitHub  路  3Comments

rdamian3 picture rdamian3  路  3Comments

stopachka picture stopachka  路  3Comments