Hello,
I've got a problem. In my company for some purposes we have to dev on offline environment... So i do the configuration on my personal laptop which is online, all works good. So let's go, zip the project, and put it on my offline environment... That's when problems began. When i run npm run dev i've got a message : 'vite' is not recognized.... So ok, i've just had to run npm install, and this is where the problem is. So does anyone have a solution? Thanks
#Help for offline dev environment usage
1 messages · Page 1 of 1 (latest)
Could you elaborate about what happen when you type npm install?
And please, use versioning tools.
When i run npm install it gave me an error, because it searched to connect to internet. To be more precise :
npm ERR! code EAI_AGAIN
npm ERR! syscall getaddrinfo
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/@babel/parser/-/parser-7.22.4.tgz failed, reason : getaddrinfo EAI_AGAIN registry.npmjs.org
Like i said... I'm offline. And i use versioning tools. But to transfer my project from online environment to offline, i don't have many choices except zip it and use usb stick.
is the node_modules folder included in your zip?
(npm install on your personal laptop first)
Yes the node_modules folder is include in my zip. I've run npm install before. My project work fine on my laptop
Sounds like when copying it over some paths changed and now npm can't locate the vite executable in node_modules, which is probably not specific to vite (other packages that have a binary you run probably have the same issue?)
if you run npm ls -g is vite installed as a global tool by any chance?
Oh, thanks, that was that! All my faut, i work on linux and my offline desktop is on windows... So i've just create a VM, run npm install and that's work. Thanks again!
You might be interested in yarn zero-installs for this situation