简体   繁体   中英

Windows Linux subsystem commands do nothing and fail silently

I've activated the Linux Subsystem in Windows and thought everything was working fine; I pulled down my dotfiles and vim config and everything seemed great - until I started trying to work.

To start, I wanted to set up a Foundation project - which meant I'd need node (npm), bower, and the foundation CLI.

I installed node successfully using apt-get but couldn't run npm so I installed it using apt-get as well - Then I successfully used npm to install the foundation-cli.

When I tried to run the foundation new command, though, it just fails silently or does nothing.

node -v yields the same results; nothing happens. I checked my path and used which to confirm that node, npm, and foundation are all in my path (although, they are all in different directories in my path)

Is this a path issue? Permissions?

Here's my output for reference:

root@SC-ME-W10:~# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
root@SC-ME-W10:~# which npm
/usr/bin/npm
root@SC-ME-W10:~# npm -v
1.3.10
root@SC-ME-W10:~# which node
/usr/sbin/node
root@SC-ME-W10:~# node -v
root@SC-ME-W10:~# which foundation
/usr/local/bin/foundation
root@SC-ME-W10:~# foundation -v

I'd have issues getting node to work properly as well. I have had success installing it via nvm. https://github.com/creationix/nvm

Here's a set of instructions from memory in case it helps:

  1. Uninstall currently installed versions of Node and npm.
  2. curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash as per https://github.com/creationix/nvm
  3. Close and reopen bash .
  4. nvm install 6 (or whichever version you're looking for)
  5. Try to work w/ npm and node as you do normally.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM