You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Building the server of Node.JS week 1 prep, I noticed that when you complete step 1 create a server.js file, it should instead be create a server.mjs file. Reason being is that in step 2, your told to import the express library. This will work, but only if you add type: "module" to your package.json file, which is not stated to do so in the prep. This causes running the command node server.js in the terminal, to produce an error. (Which I'm not going to add because its a bit long).
How could this be fixed?
Option 1 steps:
Keep the "create a server.js file"
Tell people they need to add type: "module" to the bottom of there package.json file
Explain why they need to do this maybe?
Option 2 steps:
Change "create a server.js file" to instead say "create a server.mjs file"
Change step 5 "Switch the server on!" to say "node server.mjs" instead of "node server.js"
Describe the bug
In the Building the server of Node.JS week 1 prep, I noticed that when you complete step 1 create a server.js file, it should instead be create a server.mjs file. Reason being is that in step 2, your told to import the express library. This will work, but only if you add type: "module" to your package.json file, which is not stated to do so in the prep. This causes running the command node server.js in the terminal, to produce an error. (Which I'm not going to add because its a bit long).
How could this be fixed?
Option 1 steps:
Option 2 steps:
Link to content
(https://curriculum.codeyourfuture.io/servers/sprints/1/prep/#building-the-server)
The text was updated successfully, but these errors were encountered: