How to yum install Node.JS on Amazon Linux

Stumbled onto this, was strangely hard to find again later. Putting here for posterity: sudo yum install nodejs npm –enablerepo=epel EDIT 3: As of July 2016, EDIT 1 no longer works for nodejs 4 (and EDIT 2 neither). This answer (https://stackoverflow.com/a/35165401/78935) gives a true one-liner. EDIT 1: If you’re looking for nodejs 4, please try … Read more

How to npm install to a specified directory?

You can use the –prefix option: mkdir -p ./install/here/node_modules npm install –prefix ./install/here <package> The package(s) will then be installed in ./install/here/node_modules. The mkdir is needed since npm might otherwise choose an already existing node_modules directory higher up in the hierarchy. (See npm documentation on folders.)

What’s the difference between path.resolve and path.join?

The two functions deal with segments starting with / in very different ways; join will just concatenate it with the previous argument, however resolve will treat this as the root directory, and ignore all previous paths – think of it as the result of executing cd with each argument: path.join(‘/a’, ‘/b’) // Outputs ‘/a/b’ path.resolve(‘/a’, … Read more

Is there a way to make npm install (the command) to work behind proxy?

I solved this problem this way: I run this command: npm config set strict-ssl false Then set npm to run with http, instead of https: npm config set registry “http://registry.npmjs.org/” Then I install packages using this syntax: npm –proxy http://username:password@cacheaddress.com.br:80 install packagename Skip the username:password part if proxy doesn’t require you to authenticate EDIT: A … Read more

Node.js: Python not found exception due to node-sass and node-gyp

so this happened to me on windows recently. I fix it by following the following steps using a PowerShell with admin privileges: delete node_modulesfolder running npm install –global windows-build-tools with administrative privilege. (in my case need restart – and restart without ask!!!) reinstalling node modules or node-sass with npm install

How to Delete node_modules – Deep Nested Folder in Windows

Since this the top google result, this is what worked for me: Update, if you have npm v5, use npx: npx rimraf ./**/node_modules Otherwise install RimRaf: npm install rimraf -g And in the project folder delete the node_modules folder with: rimraf node_modules If you want to recursively delete: rimraf .\**\node_modules [ http://www.nikola-breznjak.com/blog/nodejs/how-to-delete-node_modules-folder-on-windows-machine/ ]

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)