NPM Install only creates directories but does not actually install anything

Im using tailpress.io to create my theme, which uses node and npm. Issue is, if I run npm install in my theme directory it creates some folders but they are all empty, so its not actually installing any dependencies.

If I copy my theme out to my desktop and run it, npm installs fine. I’ve tried doing npm install from both a normal command prompt in windows along with using the site shell.

This is an annoying extra step anytime I want to install an npm package. NPM and build tools are vital in modern development so I’m surprised theres issues going back to 2022 on this with no response from the local team.

It clearly has to do something with how local is containerizing it since the same file structure works fine outside of the local_sites folder.

I dislike the idea of symlinking my theme. Tailpress uses composer, so being able to use the site shell to do composer stuff makes sense.

Thanks for the report, @joejankowiak. I can’t reproduce this on Windows so far. npm install lodash runs fine for me in a theme folder, for example, and creates both folders and the downloaded files. Local no longer uses containerisation, it runs on your actual filesystem even on Windows.

Are you running a recent build of Local? Releases - Local

Is your Local site stored on your C: drive or did you set it up on an external drive? If it’s on a non-system drive, you could try creating a new site under C: and using npm there. You might be running into a permissions issue.

Checking your npm logs may also reveal more clues.

Hmm, interesting thats good to know. This has been happening on both my work and home computers along with my coworkers two computers.

Whats super confusing, I just tried it myself on my work computer and it worked fine lol. This was a big issue last week for us and I’ve been running into it for a few weeks now. Best way to fix something is to make an issue for it as it always starts working immediately after.

I’ll try it on my home computer tonight and see if I can figure out anything. I’m thinking it may be due to a permission error. All my permissions uploaded to wpengine were incorrect causing other issues with pushing but I just fixed those. Might have been related.

That said we are just using the C drive and I’ve been keeping local up to date.