/app/node_modules/.bin/node: not found


I have a discord bot, that recently is throwing a continuous error that paths are not found for modules along the lines of:

/app/node_modules/.bin/node: 8: /app/node_modules/.bin/node: /app/node_modules/.bin/…/…/…/rbd/pnpm-volume/a215dda2-cb02-491e-a421-2dfe55178574/node_modules/node/bin/node: not found

This started occurring 2 days ago and it appears to be attempting to install node with pnpm, but failing every time. I do notice the node version is updated compared to the original version I had created the bot with.

Could I get the command to fix this path not found? I tried remixing the project and rolling it back, but have been able to resolve this error.

Project name is danmemo-bot

Thank you

On a side note, curious why it’s re-installing node. Does glitch automatically update the node version or is this from a command I have set in the bot?

Hi @Tsuora, welcome to the Glitch forum!

I’m pretty sure what you’re seeing is because you have Node listed in your package.json dependencies. If you want to control the version of Node your project uses you should instead use the engines option in your package.json file:

  "engines": {
    "node": "12.x"

and remove node from your dependencies.

Can you give that a try and let us know how you get on?

Hi Cori,

Thank you for the welcome! I removed the node dependency from package.json and still receive the same error:
/app/node_modules/.bin/node: 8: /app/node_modules/.bin/node: /app/node_modules/.bin/…/…/…/rbd/pnpm-volume/a215dda2-cb02-491e-a421-2dfe55178574/node_modules/node/bin/node: not found

I also tried adding the node version under an engines option. This did change the error to say the specific version was not found and it will be using version 10 instead. Before the same error appeared again.


Hey @Tsuora when I added that engines block of json to a package.json file in a Remix of your project everything started just fine, but I see that it’s not in your current package.json file. I also see that you have your debugger on.

Can you try:

  1. turning off the debugger using the Stoplight / Ladybug button in your project’s logs pane?
  2. re-adding the engines block. Make sure you add the leading or trailing comma to make sure your package.json file is correctly formatted
  3. if you still see errors, triggering a completely fresh install by running enable-pnpm in the console

and let us know how it goes?

1 Like

Hi Cori,

I turned off the debugger and added in the engines block, but still received the error. However, using the command enable-pnpm fixed the issue!

Thank you very much! I will keep command in mind if it happens in the future.



Same! I also had that error and ‘enable-pnpm’ fixed it!

1 Like