Sh1: ts-node: permission denied

Hello everyone!

I’m trying to run a cors server in typescript as a web service instance, the build goes ok, but it gives a “permission denied” error when deploying with “npx ts-node src/server.ts”. I’m using ts-node to run my typescript server and it’s installed globally, it runs successfully on my local machine. Can someone, please, explain why it happens and help me to fix this?

I’m using npm install command to build and npx ts-node src/server.ts to deploy.

1 Like

I figured out the problem… It seems a bug on node that some broken packages “messes up” with the permissions. I just did:

  • delete node_modules folder with:
rm -rf node_modules
  • then, reinstall the packages with npm install and it’s working fine.
1 Like

Thanks for sharing your solution with the community!

And thanks for using Render!

Alan

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.