menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

JS Everywhere

A community for the JavaScript Everywhere book by Adam Scott, published by O'Reilly.

Channels
Team

Hello! I noticed a glaring omission in the Hello World example in Chapter 3!

November 3, 2019 at 2:50am

Hello! I noticed a glaring omission in the Hello World example in Chapter 3!

November 3, 2019 at 2:50am
It says:
Now to run our application, we type node src/index.js in our terminal. After doing so, we should see a log in our terminal that reads Listening on port 4000!. If that’s the case, open a browser window to http://localhost:4000 and we should see the following:
but never mentions the need to run npm install in order to dependencies (i.e. express) - somebody with zero Node,js experience would not "know" to do that and would be instantly derailed at the very first example! :heart:

November 10, 2019 at 12:49pm
Hi ! Thanks for your comment - this seems to be a frequent point of confusion for folks. I intentionally use a starter project, so that readers would not need to npm install dependencies themselves (and so that I could ensure consistent versions between myself and the reader). Unfortunately, I don't think I made that very clear. I'll be adding a note to the start of each major section (API, web, desktop, mobile) to try to clarify.

December 1, 2019 at 1:10pm
Ack! I was doing a final pass through of the book before handing it over to O'Reilly and I noticed that I had completely neglected to include npm install with the code cloning instructions. That has been fixed as well as adding an explanatory call out. Thanks again!
You're welcome! Would you like me to share other issues/typos/etc. or did you already Send It? :)
Everything has been through a couple of rounds of edits and technical reviews (though I did miss the npm install thing), so I am hopeful that it should be in good shape. None of those updates are on Safari just yet though. I'm doing a final careful pass through this week. If you do notice anything glaring, feel free to shoot me an email at [email protected], but hopefully all (or most!) errors should already be addressed. I'll also ping the folks at O'Reilly to see if they can push the updates to the first few chapters to Safari

June 30, 2021 at 5:33am
I think this is happening to me as I followed the instructions and my terminal is throwing an error and I'm on this example

June 30, 2021 at 3:59pm
(ejflower98) reports resolving this issue. Please share your resolution if you have a few minutes for any future readers. Thank you!
(adamdscott) that was actually another issue I resolved, this one I am stuck on still.
(ejflower98) what error are you getting? :)
its sending me a Error: Cannot find module '
I hope its something simple
(ejflower98) and you ran npm install etc.?
That would be my suggestion as well. Be sure to run npm install from the root of the project directory. Please let me know if you are still experiencing an issue
yeah I believe so but I don't know that much about node or anything since I'm a beginner... I could screenshare so you can see

July 1, 2021 at 4:41pm
(ejflower98) I suspect that this may be similar to the issue discussed in https://spectrum.chat/thread/ff2dad50-e5bd-4654-93df-2b84eb63ccb0?m=MTYyNTA2Nzg3MDQxMw==
Be sure to cd into the root directory of the project and then run npm install