-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First reference to package.json needs an explanation #7
Comments
Hi @juananpe, I'm curious why this was closed. This still seems to be the first mention of package.json. I'm currently going through the book right now and I'm finding that this missing bit of setup information is causing me to get "SyntaxError: Cannot use import statement outside a module" errors because I don't have a package.json file. |
I think what's missing is setup instructions and a disambiguation between node and npm (a la rustc and cargo in the rust book). |
In "Chapter 1: Introduction" in "Section 1.1: Who is our audience?" we can read that:
I guess it is assumed that the reader have a basic understanding of Node, npm and hence |
Yes, but what do you mean by a 'basic understanding' in this context? I would consider myself to have a basic understanding according to the criteria listed in the "Audience" section, but I did not stumble because of any lack of knowledge of what a I stumbled because of a variety of reasons: While I have worked with Node in the past, I did not have a clear disambiguation between JavaScript and Node. Any time I worked with Node, it was always through npm, but the resources that clearly disambiguate the two are not easily found, so my concept map was incomplete. Beyond that, the first thing we are presented with in the book is a single JS file and then a command to run that file from the command line. The unstated assumption is that we are working inside of a Node package, which requires either a hand-crafted or My suggestion would be to 1) add something to the requirements that indicates to the user that they should know the differences between JavaScript and Node JavaScript and 2) clearly indicate that we are in a package context for the examples (my inserted text is in bold and the additional callout):
|
I think that this reference to package.json should be clarified
https://github.com/gvwilson/sdxjs/blame/main/en/src/systems-programming/index.md#L76
(as far as I can tell, this is the first reference to that file, isn't it?)
The text was updated successfully, but these errors were encountered: