r/reactjs • • Aug 01 '18

Beginner's Thread / Easy Question (August 2018)

Hello! It's August! Time for a new Beginner's thread! (July and June here)

Got questions about React or anything else in its ecosystem? Stuck making progress on your app? Ask away! We’re a friendly bunch. No question is too simple. You are guaranteed a response here!

Want Help on Code?

  • Improve your chances by putting a minimal example on to either JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new). Describe what you want it to do, and things you've tried. Don't just post big blocks of code.
  • Pay it forward! Answer questions even if there is already an answer - multiple perspectives can be very helpful to beginners. Also there's no quicker way to learn than being wrong on the Internet.

New to React?

Here are great, free resources!

27 Upvotes

568 comments sorted by

View all comments

Show parent comment

2

u/swyx Aug 22 '18

heh, that's a new one. "works on your machine".

this sounds like a windows vs mac issue. i'm installing your thing now on my mac, if it runs its likely a windows specific thing i cant help with, sorry


ok i tried to run yarn start. it dies immediately because your npm start script is "start": "node Routes.js" which is a non existent file. did you rename this somehow?


ok i just tried yarn build and this is what i got

yarn build
yarn run v1.7.0
$ webpack-dev-server
ℹ 「wds」: Project is running at http://localhost:8080/
ℹ 「wds」: webpack output is served from /
✖ 「wdm」: Hash: e1a464c5a99cde65516c
Version: webpack 4.17.1
Time: 6151ms
Built at: 08/22/2018 6:42:52 PM
1 asset
Entrypoint javascript = App.js
[2] multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.js 40 bytes {0} [built]
[3] (webpack)-dev-server/client?http://localhost:8080 7.78 KiB {0} [built]
[4] ./node_modules/url/url.js 22.8 KiB {0} [built]
[5] ./node_modules/punycode/punycode.js 14.3 KiB {0} [built]
[7] ./node_modules/url/util.js 314 bytes {0} [built]
[8] ./node_modules/querystring-es3/index.js 127 bytes {0} [built]
[11] ./node_modules/strip-ansi/index.js 161 bytes {0} [built]
[12] ./node_modules/ansi-regex/index.js 135 bytes {0} [built]
[13] ./node_modules/loglevel/lib/loglevel.js 7.68 KiB {0} [built]
[14] (webpack)-dev-server/client/socket.js 1.05 KiB {0} [built]
[16] (webpack)-dev-server/client/overlay.js 3.58 KiB {0} [built]
[18] ./node_modules/html-entities/index.js 231 bytes {0} [built]
[21] (webpack)/hot sync nonrecursive ^\.\/log$ 170 bytes {0} [built]
[23] (webpack)/hot/emitter.js 75 bytes {0} [built]
[24] ./node_modules/events/events.js 8.13 KiB {0} [built]
    + 10 hidden modules

WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/

ERROR in multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.js
Module not found: Error: Can't resolve '.\src\index.js' in '/Users/swyx/Desktop/webdev/testbeds/reach'
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.js javascript[1]
ℹ 「wdm」: Failed to compile.

so yea it doesnt work