31 Jan 2021
npm code eexist can use npm install solutions
When you create new apps and success to download or clone on your local pc desktop, but when you run "npm i" you have a error. so maybe this problem about your enviroment variable, this is case many i see on windows os.
Yapp ketika kamu sedang asik belajar misalnya install react dan gatsby trus pas install npx create-react-app my-app atau gatsby new gatsby-site dan waktu install baru berhasil sih dan ngebuat folder baru,, tapi.. ada kendala saat menjalankan npm i, ada eror gitu... nah kalau kamu nemuin kasus ini, maka selamat membulet mbulet dan beruwet ruwet ria dengan ini, hehehe... banyak faktor juga yang mempengaruhi nya, mulai dari settingan env untuk windows dan pokok nya banyak deh,, nih PR yang paling males kalau suruh nyariin letak kesalahan nya, karna yaitu tadi saking buanyaknya hal yang bisa menjadi kendala permaslahan kasus ini, oke deh sekarang kamu coba cara pertama dibawah ini yak...
there is many solutions for have a problem about npm code eexist error when you run npm install for develope react gatsby nextjs etc, for first you can delete node_modules files, and package.lock.json then run npm install again * (this case when you using apps) on root directory global you can click on windows logo then visit enviroment variables, and create new path on PATH files then insert
- C:\Program Files\Nodejs
- C:\{your-user-pc-name}\Node_modules\
- C:\Users\{your-user-pc-name}\node_modules\npm\bin\npm-cli.js
create new path and input path then save it, close your shell or comand prompt / NPM then open again and try to run "npm install".
if work congratulations now you can solved npm code eexist can use npm install solutions.
But if can't , don't wory you can try option two.
Nah setelah kamu jalankan perintah diatas dan jika sukses selamat kamu berhasil , dan jika masih kagak bisa , tenang aje kita coba jurus cidori nagasi dari sasuke... let's get started....
Open on your project folder then you can open shell or comand prompt npm then you can run this code : npm install --force
and you can install it, but if can't install, just download yarn and work with yarn maybe your node wrong installation.
because so many things can be sensitive with this case of you wrong enviroment variables npm displaying many case like spawn node enoent,and more more erorr eilifecycle...... in my case, mostly happened to the React framework, beacuse i'm try on vue or angular and next , riot js is work, this is what I finally decided to dive into and shifted a little to the angular framework.
Sedikit curhat karena waktu itu menggunakan react sebagai project akhirnya perlahan beralih ke angular, ini sih bukan idealis, ya karena salah satu di pc kita ada problem itu, gak mungkin dong install ulang pc wkwkw... ya pindah dan migrasi mungkin jalan terbaik, walaupun angular malah bikin botak kepala setidak nya membantu untuk pengerjaan project dengan mudah nya di install dan dijalankan dimana aja, ini cuma kasus saya aja yes.. kalau pc kalian gunakan aman sih pakai terus aja selagi nyaman dengan framework nya.
And of course I am not idealist on one framework but to learn I need to learn all of them. of course that makes it easier for me to develop a project
The best solutions about this problem , you can uninstalll all then install again. and remove all nodejs folder , package.lock.json,. package.json. npm.cmd and all about npm ,Restart your pc then install again. if you can't install gatsby or react js you need to run your shell terminal as administrator, just rigt clik on your shell npm then run as administrator, and now you can install react and gatsby normaly.
And if you need react and angular source code for learn you can download we open source code project ini here , just click and select the source code free download gratis.
- React typescript feat ionic build mobile web apps
- React Stock inventori for learn
- React Simple Blog post
- React Point of sale
- Angular Blog
- Angular Ionic build mobile web apps project
- ANgular Online Shop
- Phoneixs angular cms with firebase database
- Angular KIOS Point of sale
- Integration Angular with Laravel
Hapy codding.....