Hot answers tagged

60

npm install -g windows-build-tools ran in an administration window: Starting installation... Launched installers, now waiting for them to finish. This will likely take some time - please be patient! Waiting for installers... -Successfully installed Python 2.7 Waiting for installers... /Successfully installed Visual Studio Build Tools.


39

set http_proxy worked really well for me but I had to enter it in every time I opened the command prompt. So I had to combine multiple answers and now mine is permanent. My sequence went as follows: Go to C:\Users\YourUserName Create a file named .npmrc Inside that file type the following (if you are on an AD domain): proxy = http://domain\\username:...


23

If you're using oh my fish you can install the nvm plugin (after installing NVM with homebrew). $ omf install nvm Then set the NVM_DIR and all should be fine. $ set -gx NVM_DIR (brew --prefix nvm)


19

My problem was that I installed uglifyjs, and not uglify-js. uglifyjs does not include the binary. Just leaving this here if someone else is stuck the same way. sudo npm install -g uglify-js


18

We provide two nodejs packages: nodejs in main – LTS version, nodejs-current in community – the current version, as its called by upstream. So if you want the latest version, install nodejs-current by running: apk add nodejs-current Currently it’s 7.10.1 in v3.6 (stable branch) or 8.5.0 in edge (unstable/rolling branch). We don’t use @N suffixes like ...


14

If you are talking about running interactively, you can use a bash alias. Put this in your ~/.bashrc: alias node="node --harmony" (For the below: note that when I say "executable", I don't just mean binaries or ".exe files". "Executables" include anything that can be executed without explicitly invoking an interpreter, which includes scripts with a shebang....


13

Most likely your node application is binding to the loopback IP address 127.0.0.1 instead of the "all IPs" 0.0.0.0 since this is the default behavior of listen. Specify both port and IP in your call like server.listen(80, '0.0.0.0'); and try again.


13

To manually interact with it you need a client to speak the protocol. This is what a web browser does, it speaks http/https for you and issues commands (GET, POST etc.) and renders the responses for you visually. The default client for manually interacting with MongoDB is the mongo shell - it will connect and speak the MongoDB Wire Protocol for you over TCP/...


12

One Windows restart isn't enough, I restarted twice and the problem is gone. Sorry, I don't have anything more technical. Except: 1: Try not to develop on WSL from a Windows folder.


11

Is there anything displayed if you run npm get prefix ? (For example's sake, I'll say "/usr/local" is returned after running the command) If anything is returned after running the above command, check what your PATH environment variable is set as by running echo $PATH (Again for example's sake, I'll say "/usr/bin:/bin:/usr/sbin:/sbin" is returned after ...


10

I know this is an older question, but I ran into the same issue. The solution I came across was to first create an empty node_modules folder and then sync that with the cloud. Once the empty folder was synced, I then went into OneDrive settings → Choose folders and deselected the node_modules folder. Then when you run npm install in the project root ...


9

That guide is for Ubuntu, and you're not running Ubuntu. Try the guide for Fedora instead if you have yum: su -c 'yum install cairo cairo-devel cairomm-devel libjpeg-turbo-devel pango pango-devel pangomm pangomm-devel' npm install canvas Source


9

Background OneDrive doesn’t allow to exclude directories by name, and that’s something that won’t change soon: [OneDrive’s representative response on a UserVoice request:] Not right now Some people recommend to uncheck directories you don’t want to sync in OneDrive settings, but that became impossible with OneDrive Files on-demand. Solution However, ...


8

There is no built-in way to do this. But you can create one for the right-click of a folder (just like the "Open command prompt here" examples on the internet). Create a file named Open Node-prompt here.reg and double click it (and click Yes and OK): Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Node] @="Open Node ...


8

That is correct. Unfortunately, 4.4.4 is not available. You should avoid being explicit on package versions unless controlling your own package mirror and package builds, rather allow the package system to handle it for the Alpine release in use. For Alpine 3.4, only 4.6.0 is available. Search Alpine 3.4 x86_64 Packages Online for nodejs-lts If you are so ...


7

It may be too late but I figured out a way to achieve it in very simple steps. In Network settings of Guest OS, use Bridged Adapter. Run Node.js server with IP 0.0.0.0 instead of 127.0.0.1 . Above settings works and I can access the server from other machine in same networks as well.


7

Press Alt + D then type cmd and hit enter This will open cmd in your current folder, in case anybody is looking for an alternate method. The cmd for windows is same as the one node uses. I have tested with node commands. Thanks Rik (in comments) for the info.


7

You can use Bass. Clone the git repository git clone https://github.com/edc/bass.git Then cd in the cloned directory and type make install bass source ~/.nvm/nvm.sh ';' nvm use stable Now you should be able to use node inside fish shell.


7

I don't know anything about Openshift, but that last image certainly looks like it's doing a permanent redirect (a 301) from lsmsasgo.com/<anything> to www.lsmsasgo.com/<anything>. What happens if you delete that? Or change the www to xyz? The xyz page won't load, but you should see the redirect change from lsmsasgo.com -> www.lsmsasgo.com to ...


7

Unfortunately, Alpine-Linux Package Management drops older packages when there are newer versions available. This makes it hard to use Alpine Linux with docker since you want a reproducible image with exact versions. See this article for the entire rundown. The two solutions that are offered: Create you own mirror and host the specific version of the ...


6

Get you current local network IP and, run http server like this: server.listen(80, 'current_local_ip');


6

The solution was to uninstall the "node" package: sudo apt-get remove node Note: This is a completely different package than the stable release version of Node.js.


6

It was a connection problem. I remember thatI played with proxy configuration by mistake like this : npm config set proxy http://localhost:8080/ npm config set https-proxy http://localhost:8080/ npm config set strict-ssl false which made npm client attempts to hit localhost:8080 to pull the module rather than the correct internet endpoint. so ...


6

After over 4 hours of trouble shooting, I found that the error was being caused by having a NODE_OPTIONS environment variable set with a value of --max-http-header-size=32767 in my System Environment Variables. Removing this environment variable entirely fixed my issue with VS 2017 and 2019 crashing.


6

In my case the error appears because the port used belong to reserved ports for Hyper-V. This port range changes when I restart my computer, so sometimes I get the error sometimes no. To check reserved ports by windows you can use(cmd/powershell): netsh interface ipv4 show excludedportrange protocol=tcp The issue is described in: https://github.com/...


5

https://github.com/guzzle/guzzle/blob/master/tests/Guzzle/Tests/Http/server.js#L132 See line 132. Your app is bound to only the loopback interface. A quick netstat should confirm that. $ sudo netstat -ltpn | grep 8124 Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:8142 ...


5

In my case, I have set registry via npm config set registry <corporate_registry_url> an authenticated via npm login and I had this 401 error until I've added to .npmrc this line //<repo_url>:always-auth=true after the following line //<repo_url>:_authToken=<token> This way, token got applied and installation of a package succeeded....


4

I was bumping into this for a while (getting 127 errors). It turns out you need something like this in your plist: <key>EnvironmentVariables</key> <dict> <key>PATH</key> <string>/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin</string> </dict> launchd seems to execute things with a minimal ...


4

If you are ready to recompile node.js, the article How to obtain harmony in your node.js says : Once you’ve got the source code, open up deps/v8/src/flag-definitions.h and look for Line 115. Change the flag from false to true : DEFINE_bool(harmony, true, "enable all harmony features") Then compile Node : ./configure && make && ...


4

This is caused by the fact that when setting a variable, you should not prefix it with $. Here, the $NODE_CONFIG_DIR is expanded into nothing (as it is unset) before running the line, which makes you run export =/Users/full/path/to/script/config. The script should be #!/usr/bin/env sh export NODE_CONFIG_DIR=/Users/full/path/to/script/config cd /Users/full/...


Only top voted, non community-wiki answers of a minimum length are eligible