Configure the node environment under Linux, internal/modules/cjs/loader.js:583 throw err; solution

When installing node using the direct deployment method, internal/modules/cjs/loader.js:583 appears

After downloading the node package and decompressing it, establish a soft connection

Configure node
ln -s /root/node-v10.16.3-linux-x64/bin/node /usr/local/bin/node

Configure npm
ln -s /root/node-v10.16.3-linux-x64/bin/npm /usr/local/bin/npm

But when using npm install “XX”, I got a crazy error. I saw that it was an error when establishing a soft connection on the Internet.
Error: Cannot find module’/root/install’

Solution:
ln -sf /root/node-v10.16.3-linux-x64/bin/npm /usr/local/bin/npm

OK, solve

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *