flowforfrank / mario

🎮 Remake Mario in PhaserJS
https://webtips.dev
8 stars 6 forks source link

Can't open index.html #1

Closed ryanNewcodeer123 closed 2 years ago

ryanNewcodeer123 commented 2 years ago

Hi, I am new to js and I just wanted to start a new project, and I found this on webtips. dev and I just copied your index.html to my and type npx parcel index.html but it shows this: Screenshot 2022-09-03 184055 Screenshot 2022-09-03 184748 My index.js: Screenshot 2022-09-03 184434 How to fix that? Also, my package.json and package-lock.json is also coped from you Let me know how to fix that. Many thanks Ryan

flowforfrank commented 2 years ago

Hey @ryanNewcodeer123 After cloning the GitHub repo, you need to run npm i to install all dependencies. The reason you are getting the errors is because you have not installed the dependencies and so NPM cannot find Phaser or Parcel. After the installation is done, you can run npm run start to start the project, so in order, you need to do the following inside your terminal:

- npm i
- npm run start