I recently switched to WSL due to a performance issue and now my npm watch process stops instantly after launching. It successfully builds the Sass file, which is currently the only build file, but then it stops right after creating the file.
I’m not sure what’s going wrong. It used to work fine with the standard installation. I’m not a professional coder; I’m just trying to navigate through simple tutorials and use GPT to help out.
I don’t have personal experience using npm watch process but could you try adding a --verbose parameter in the command (npm run watch --verbose) to hopefully provide more details as to why the process stops?
I also just wanted to check and mention, that as you’re using WSL now, I’m wondering if the issue you’re experiencing with the NPM issue above might be related to the UNC path thing? - which you would need to map the WSL network path to an actual local drive in Windows first (if you haven’t done so?)
Could you please confirm if that Z:\ drive is the actual local drive you have in your Windows machine? or is that a mapped drive already (that’s mapping to your WSL network path: \\wsl.localhost\docker-desktop-data\ ?)
In case you haven’t mapped the local drive to that WSL network path, perhaps you may want to try to perform this command line (in Command prompt) something like this:
net use x: \\wsl.localhost\docker-desktop-data
(note: where x: can be changed with any local drive you would want to map/assign for that WSL network path - as long as that “x” drive does not exist on your local computer) - similar to the one I mentioned in the other thread here and here .
Once done, you can go to that x: drive via command prompt , and there CD to that folder: data\docker\volumes\DevKinsta\public\spiegelando
and see if you can perform that npm command line?
I am afraid I couldn’t find any clear entry as to why the process is stopping based on the screenshot you provided. Nevertheless, I suggest that you try increasing the CPU and Memory allocated for the Docker Desktop to see if that fixes the issue. You can do this by navigating to Docker >> Settings >> Resources page. Additionally, you may want to temporarily disable Docker’s Resource Saver feature and check if that helps.
I hope this information is helpful to you. Please keep us posted on how it goes.
We still haven’t heard an update yet from our DevKinsta engineers as my colleague reported few days ago.
Anyway, I’m just wondering what if you run that NPM command line directly within the devkinsta_fpm docker’s container (via its Terminal/Exec tab) instead of from that Z: network drive that’s mapped to the WSL path?
On your docker desktop → Containers menu, click on the “devkinsta_fpm” name:
there, you may want to go inside your local site folder by typing something like: cd /www/kinsta/public/yoursitenamehere
and try to run the npm command line? if it works there?
If it says that NPM is not found (i.e: /bin/sh: 9: npm: not found ), then you will need to install NPM/NodeJS in that “devkinsta_fpm” container .
To install it on that docker’s container, you can run the following one-line command in that “Exec” tab (terminal) on your Docker Desktop: