#Trying to install dependencies
40 messages · Page 1 of 1 (latest)
Yeah, it can happen with npm from time to time. When you are focused in the terminal, press ctrl + C to stop the process, and run npm install again. For a good measure you can remove /node_modules folder to make sure that there are no corrupted files in some module due to forcefully killing the process
deleted node modules folder and ran npm install --legacy-peer-deps again but still same issue
tries on a macbook and my pc both having the same issue
I'm not 100% sure, but OneDrive might be responsible for it. Try moving project folder somewhere else and running it again. Also have you tried running npm install without --legacy-peer-deps?
when i run npm install
Okay, can you move project directory outside OneDrive directory?
I tried dragging and dropping the file to a different location but it still exists inside the onedrive
Try moving the project to for example C:\e-commerce, open it in your IDE and run npm install there
still keeps loading
Are you trying to install some public repository? If you can link it, I'll try to reproduce it on my end and see if there is some way to fix it
Have you copied the package.json of the project to insure you use the same versions of all dependencies?
Perhaps another node version?
That link is inaccessible.
apologies try again now
The fact that you need to use --legacy-peer-deps already means you are likely to encounter complications. This typically means you are working on an older project. It also means substitutes are going to be used, and those are not guaranteed to all be compatible with each other.
the project was released december 1 2023
Learn how to build an incredible e-commerce webshop with an admin dashboard and CMS using Next 14, Stripe, TypeScript, and Payload CMS.
⭐ Payload CMS: https://payloadcms.com/new?utm_source=youtube&utm_medium=video&utm_campaign=jsmastery
🌟 Become a top 1% Next.js 14 developer in only one course: https://jsmastery.pro/next14
📚 Materials/Referen...
i directly cloned it using github desktop
Was --legacy-peer-deps used in the video?
yes
Do you think I can continue working on this project without having to install the dependencies? or is there a manual way to instal them?
That means it was already using some dependencies that were old at that time.
Dependencies are required and it is not practical to install them in some other separate way.
npm install with and without --legacy-peer-deps hangs on my computer too. There are some comments below the video stating that JSM's repo with finished project doesn't work too
There are over a dozen differences between your package.json and the one provided by Adrian. This is Adrian's verions: https://github.com/adrianhajdin/ecommerce/blob/main/package.json
Learn how to build an incredible e-commerce webshop with an admin dashboard and CMS using Next 14, Stripe, TypeScript, and Payload CMS. - adrianhajdin/ecommerce
shall i just copy and paste these into my vscode?
Yes.
This one worked for me.
added 1300 packages, and audited 1301 packages in 3m
No wonder it takes a bit 😅
Delete your node_modules folder first before you try to install again.
Use npm install --legacy-peer-deps. It might take a while, but it should work
for some reason when i delete node modules folder then use npm install --legacy-peer-deps, the node modules folder re appears itself
Yeah, that's the folder with all installed packages. When you run npm install it downloads and installs the packages there
That should happen. The install puts files into that folder. The reason to delete it is because you did previous installs with different settings in package.json, and the files that got placed in there can interfere.
so I changed my package.json code, removed the node_modules folder and then ran npm install --legacy-peer-deps and still same problem 😢
it worked on my laptop! idk why it wont on my pc but i guess il have to run with it
thanks so much for your help
If you have any lock-files remove them too when removing the folder, then reinstall