Hey Replit Community,
I seem to have run into a fundamental and persistent issue with npm package installation on a project and I’m hoping to learn if others have experienced something similar.
My Environment:
- Repl Template:
nodejs-20,web,postgresql-16 package.jsonsetting:"type": "module"- Key Dependencies:
drizzle-kit,tsx
The Core Problem:
The issue is that npm install reports a successful completion, but key packages (specifically their executable binaries) are not actually being written to the node_modules directory. This results in command not found errors when trying to run scripts defined in package.json, and MODULE_NOT_FOUND when trying to run them directly with node.
This is a silent failure of the installation process.
Troubleshooting Steps Already Taken:
Before posting, I have exhausted all standard and advanced debugging steps I can think of, including:
- Clean Re-installs: Multiple attempts using
rm -rf node_modules package-lock.json && npm install. - Cache Clearing: Running
npm cache clean --forcebefore installing. - Manual Verification: Manually searching the
node_modulesandnode_modules/.bindirectories and confirming the expected files fordrizzle-kitandtsxare missing. - Configuration Changes: Renaming
drizzle.config.tstodrizzle.config.cjsto rule out any ESM vs. CJS module loading conflicts. - Direct Execution: Bypassing
npmandnpxto call scripts directly withnode node_modules/drizzle-kit/bin.cjs push. This fails as expected because thebin.cjsfile doesn’t exist. - The Ultimate Step - Environment Recreation: I “Remixed” (forked) the entire project into a brand new, clean environment. The exact same silent installation failure occurred immediately in the new environment after the first
npm install.
My Conclusion:
The fact that the issue persisted identically in a brand new, clean environment leads me to believe the problem is not with my specific code configuration, but with the underlying “golden image” or template Replit is using for this particular stack (Node.js 20 + Postgres 16).
My Question for the Community:
Has anyone else encountered this specific type of “ghost” installation, where npm install succeeds but doesn’t actually place the files? If so, have you found any workarounds or solutions beyond filing a support ticket?
Any insights or shared experiences would be incredibly helpful. Thank you!