react_webpack_starter | React 16 and Webpack 4 starter pack
kandi X-RAY | react_webpack_starter Summary
kandi X-RAY | react_webpack_starter Summary
React 16 and Webpack 4 starter pack
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of react_webpack_starter
react_webpack_starter Key Features
react_webpack_starter Examples and Code Snippets
Community Discussions
Trending Discussions on react_webpack_starter
QUESTION
Using a simple starter react app with webpack-dev-server, it works on one computer but not another.
Tried / Info- Both computers are windows 10
- Using vscode/git bash on both
- node -v
9.11.1
on both - npm -v
5.6.0
on both - yarn -v
1.5.1
on both - Tried both yarn and npm
- Deleted all global npm modules in ~/appdata/roaming/npm on both computers
This is not my repo but a simple one that works for testing. Comes from awesome video.
git clone https://github.com/bradtraversy/react_webpack_starter
cd react_webpack_starter
npm install
npm start (runs webpack-dev-server --mode development --open --hot)
Browser opens with "My React App"
Actual Result (1 computer):- Directory listing instead of app, shown here.
- This indicates webpack --contentBase issue, but when I set it to src/, the index.html file is shown, but it appears like no react code is processed.
- terminal output here
I don't know what the issue is on the env with the non-working computer. Symptoms indicate it is not the repo or code, but has to be in how my env. Spent 6 hours working on this issue on the computer where it fails. Though it was me being an idiot somewhere, just to have it work on a different computer. Anyone have any ideas on what the difference in environments could be?
Solution:As per Peter Liang's suggestion,
- I tried cloning repo into C:\testtest and it worked.
- I tried cloning repo into C:\test test and it failed (showed directory listing).
Webpack-dev-server doesn't seem to be able to deal with paths with spaces.
Added an issue to webpack-dev-server github here
...ANSWER
Answered 2018-Apr-11 at 09:12I ran into this problem and it turned out that the name of my parent directory was the culprit. My original path was "C:\React Apps\react-boilerplate", then I changed it to "C:\reactapps\react-boilerplate" and it worked.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react_webpack_starter
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page