After installing npm I typed:
npm install -g mup
It returned:
/Users/RyanCassutt/.node/bin/mup -> /Users/RyanCassutt/.node/lib/node_modules/mup/bin/mup
mup#0.11.1 /Users/RyanCassutt/.node/lib/node_modules/mup
├── colors#0.6.2
├── underscore#1.7.0
├── uuid#1.4.2
├── async#0.9.2
├── rimraf#2.4.2 (glob#5.0.14)
├── archiver#0.14.4 (buffer-crc32#0.2.5, lazystream#0.1.0, readable-stream#1.0.33, tar-stream#1.1.5, glob#4.3.5, zip-stream#0.5.2, lodash#3.2.0)
├── nodemiral#1.1.0 (debug#0.7.4, progress#1.1.5, async#0.9.0, underscore#1.8.3, ejs#0.8.8, ssh2#0.4.6)
└── cjson#0.3.1 (jsonlint#1.6.0)
I then try to create a new project:
mup init
But it returns:
-bash: mup: command not found
Is mup not installing correctly or is there some type of error? Thank you.
Related
I started a Digital Ocean droplet from the node.js image ( w ubuntu 14.04)
checking it, I get :
$ node -v
v4.3.0
Then , I tried to install the latest version of express.js :
$ sudo npm install -g express
express#4.13.4 /usr/lib/node_modules/express
├── escape-html#1.0.3
├── array-flatten#1.1.1
├── cookie-signature#1.0.6
├── utils-merge#1.0.0
├── content-type#1.0.1
├── merge-descriptors#1.0.1
├── vary#1.0.1
├── methods#1.1.2
├── fresh#0.3.0
├── etag#1.7.0
├── parseurl#1.3.1
├── path-to-regexp#0.1.7
├── cookie#0.1.5
├── content-disposition#0.5.1
├── range-parser#1.0.3
├── serve-static#1.10.2
├── depd#1.1.0
├── qs#4.0.0
├── on-finished#2.3.0 (ee-first#1.1.1)
├── finalhandler#0.4.1 (unpipe#1.0.0)
├── debug#2.2.0 (ms#0.7.1)
├── proxy-addr#1.0.10 (forwarded#0.1.0, ipaddr.js#1.0.5)
├── send#0.13.1 (destroy#1.0.4, statuses#1.2.1, ms#0.7.1, mime#1.3.4, http-errors#1.3.1)
├── type-is#1.6.11 (media-typer#0.3.0, mime-types#2.1.10)
└── accepts#1.2.13 (negotiator#0.5.3, mime-types#2.1.10)
but when I check express version , I get an error :
$ express -v
-bash: /usr/bin/express: No such file or directory
what could be wrong ? thanks for feedback
UPDATE ---
I uninstalled& reinstalled node.js :
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodes
$ node -v
v4.3.1
but same issue
sudo npm install -g express
express#4.13.4 /usr/lib/node_modules/express
...
$ express -v
-bash: /usr/bin/express: No such file or directory
Check that /usr/lib/node_modules/express is present in your PATH variable.
echo $PATH will print current PATH
Also, maybe you dint install express-generator?
I am getting an error whilst trying to run npm install pm2 -g on a cloud Ubuntu 14.04 microserver/droplet.
I've tried:
sudo npm install pm2 -g
and
npm cache clear -f
...followed by both sudo and non-sudo installation attempts. All result in the below.
Verbatim outcome:
npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror http://ikt.pm2.io/ikt.git /root/.npm/_git-remotes/http-ikt-pm2-io-ikt-git-4d23bf0d: undefined
npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror http://ikt.pm2.io/ikt.git /root/.npm/_git-remotes/http-ikt-pm2-io-ikt-git-4d23bf0d: undefined
npm WARN optional dep failed, continuing ikt#git+http://ikt.pm2.io/ikt.git#master
npm WARN optional dep failed, continuing fsevents#0.3.8
/usr/local/bin/pm2 -> /usr/local/lib/node_modules/pm2/bin/pm2
/usr/local/bin/pm2-dev -> /usr/local/lib/node_modules/pm2/bin/pm2-dev
pm2#0.15.6 /usr/local/lib/node_modules/pm2
├── async#1.4.2
├── eventemitter2#0.4.14
├── isbinaryfile#2.0.4
├── semver#5.0.3
├── pidusage#0.1.1
├── safe-clone-deep#1.0.5
├── debug#2.2.0 (ms#0.7.1)
├── coffee-script#1.9.3
├── pm2-deploy#0.2.1 (tv4#1.0.18)
├── shelljs#0.5.3
├── commander#2.8.1 (graceful-readlink#1.0.1)
├── vizion#0.2.11 (async#0.9.0)
├── chalk#1.1.1 (escape-string-regexp#1.0.3, ansi-styles#2.1.0, supports-color#2.0.0, has-ansi#2.0.0, strip-ansi#3.0.0)
├── cli-table#0.3.1 (colors#1.0.3)
├── pm2-multimeter#0.1.2 (charm#0.1.2)
├── pm2-axon-rpc#0.3.6 (json-stringify-safe#5.0.1, commander#1.0.5)
├── mkdirp#0.5.1 (minimist#0.0.8)
├── nssocket#0.5.3 (lazy#1.0.11)
├── pm2-axon#2.0.8 (amp-message#0.1.2, escape-regexp#0.0.1, amp#0.3.1, configurable#0.0.1, debug#2.0.0)
├── cron#1.0.9 (moment-timezone#0.3.1)
├── blessed#0.1.61
├── pmx#0.5.3 (json-stringify-safe#5.0.1)
├── chokidar#1.0.6 (arrify#1.0.0, is-glob#1.1.3, path-is-absolute#1.0.0, async-each#0.1.6, is-binary-path#1.0.1, glob-parent#1.3.0, readdirp#1.4.0, anymatch#1.3.0)
└── moment#2.10.6
root#xxxx:~#
Is the Git repo b0rked? I'm quite new to SSH/Linux servers etc so this is all probably very obvious... :/
Figured it out: turned out it had installed ok.
The above was misleading as it a) looked as though it'd not completed properly, and b) trying to run any PM2-based command immediately afterwards was resulting in an error.
But it's now working.
Sometimes then I run npm commands in the ubuntu console, e.g.
npm install forever -g
I get such feedback from the console and it is unclear to me is it installed? Is this a list of dependencies? Is this an issue? How should I proceed fixing this?
forever#0.14.1 /usr/local/lib/node_modules/forever
├── colors#0.6.2
├── timespan#2.3.0
├── optimist#0.6.1 (wordwrap#0.0.3, minimist#0.0.10)
├── nssocket#0.5.3 (eventemitter2#0.4.14, lazy#1.0.11)
├── cliff#0.1.10 (eyes#0.1.8, colors#1.0.3)
├── winston#0.8.3 (cycle#1.0.3, stack-trace#0.0.9, eyes#0.1.8, isstream#0.1.2, async#0.2.10, pkginfo#0.3.0)
├── nconf#0.6.9 (ini#1.3.4, async#0.2.9, optimist#0.6.0)
├── utile#0.2.1 (deep-equal#1.0.0, ncp#0.4.2, async#0.2.10, i#0.3.3, mkdirp#0.5.1, rimraf#2.4.0)
├── flatiron#0.4.3 (optimist#0.6.0, director#1.2.7, prompt#0.2.14, broadway#0.3.6)
└── forever-monitor#1.5.2 (watch#0.13.0, minimatch#1.0.0, ps-tree#0.0.3, broadway#0.3.6)
This is not an error message, everything installed just fine.
Output such as this shows you the other packages that were installed as dependencies for the package you have installed.
I have installed node.js and set up npm on my Yosemite install using the npm-g_nosudo script. When I then run npm install -g yo I see a bunch of content scroll through my terminal window, with no errors, and it completes. I then type yo and OS X tells me that it can't find the command.
Sullys-MacBook-Pro:~ Sully$ npm install -g yo
/Users/Sully/npm/bin/yo -> /Users/Sully/npm/lib/node_modules/yo/lib/cli.js
> yo#1.4.6 postinstall /Users/Sully/npm/lib/node_modules/yo
> yodoctor
Yeoman Doctor
Running sanity checks on your system
✔ Global configuration file is valid
✔ NODE_PATH matches the npm root
✔ No .bowerrc file in home directory
✔ No .yo-rc.json file in home directory
Everything looks all right!
yo#1.4.6 /Users/Sully/npm/lib/node_modules/yo
├── titleize#1.0.0
├── array-uniq#1.0.2
├── figures#1.3.5
├── user-home#1.1.1
├── opn#1.0.2
├── humanize-string#1.0.1 (decamelize#1.0.0)
├── sort-on#1.2.0 (dot-prop#2.0.0)
├── async#0.9.0
├── yeoman-character#1.0.1 (supports-color#1.3.1)
├── string-length#1.0.0 (strip-ansi#2.0.1)
├── cross-spawn#0.2.9 (lru-cache#2.6.2)
├── findup#0.1.5 (commander#2.1.0, colors#0.6.2)
├── chalk#1.0.0 (escape-string-regexp#1.0.3, ansi-styles#2.0.1, supports-color#1.3.1, strip-ansi#2.0.1, has-ansi#1.0.3)
├── yosay#1.0.3 (ansi-regex#1.1.1, ansi-styles#2.0.1, strip-ansi#2.0.1, word-wrap#1.0.3, pad-component#0.0.1, taketalk#1.0.0, minimist#1.1.1)
├── root-check#1.0.0 (downgrade-root#1.1.0, sudo-block#1.2.0)
├── meow#3.1.0 (object-assign#2.0.0, camelcase-keys#1.0.0, minimist#1.1.1, indent-string#1.2.1)
├── package-json#1.1.0 (registry-url#3.0.3)
├── npm-keyword#1.1.1 (registry-url#3.0.3)
├── update-notifier#0.3.2 (is-npm#1.0.0, latest-version#1.0.0, semver-diff#2.0.0)
├── got#2.9.2 (lowercase-keys#1.0.0, timed-out#2.0.0, object-assign#2.0.0, is-stream#1.0.1, prepend-http#1.0.1, nested-error-stacks#1.0.0, statuses#1.2.1, infinity-agent#2.0.3, duplexify#3.3.0, read-all-stream#2.1.2)
├── fullname#1.1.0 (npmconf#2.1.1)
├── yeoman-environment#1.2.5 (log-symbols#1.0.2, escape-string-regexp#1.0.3, untildify#2.0.0, diff#1.4.0, text-table#0.2.0, debug#2.1.3, mem-fs#1.1.0, globby#1.2.0, grouped-queue#0.3.0)
├── configstore#0.3.2 (object-assign#2.0.0, xdg-basedir#1.0.1, osenv#0.1.0, graceful-fs#3.0.6, uuid#2.0.1, mkdirp#0.5.0, js-yaml#3.3.0)
├── insight#0.5.3 (object-assign#2.0.0, lodash.debounce#3.0.3, os-name#1.0.3, tough-cookie#0.12.1, request#2.55.0)
├── lodash#3.8.0
├── yeoman-doctor#1.3.2 (object-values#1.0.0, log-symbols#1.0.2, each-async#1.1.1, twig#0.7.2)
└── inquirer#0.8.3 (ansi-regex#1.1.1, cli-width#1.0.1, through#2.3.7, readline2#0.1.1, rx#2.5.2)
Sullys-MacBook-Pro:~ Sully$ yo
-bash: yo: command not found
I also tried using source .bash_profile and rebooting. The command is still not found. Am I doing something wrong?
This is my .bash_profile
# Add environment variable COCOS_CONSOLE_ROOT for cocos2d-x
export COCOS_CONSOLE_ROOT=/Users/Sully/Development/Libraries/cocos2d-x-3.5/tools/cocos2d-console/bin
export PATH=$COCOS_CONSOLE_ROOT:$PATH
# Add environment variable COCOS_TEMPLATES_ROOT for cocos2d-x
export COCOS_TEMPLATES_ROOT=/Users/Sully/Development/Libraries/cocos2d-x-3.5/templates
export PATH=$COCOS_TEMPLATES_ROOT:$PATH
# NPM
export BIN_ROOT=/usr/local/bin
export PATH=$BIN_ROOT:$PATH
This is my full $PATH
Sullys-MacBook-Pro:~ Sully$ echo $PATH
/usr/local/share/npm/bin:/usr/local/bin:/Users/Sully/Development/Libraries/cocos2d-x-3.5/templates:/Users/Sully/Development/Libraries/cocos2d-x-3.5/tools/cocos2d-console/bin:/Users/Sully/.dnx/runtimes/dnx-mono.1.0.0-beta4/bin:/usr/local/bin:/Users/Sully/Development/Libraries/cocos2d-x-3.5/templates:/Users/Sully/Development/Libraries/cocos2d-x-3.5/tools/cocos2d-console/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
This was resolved by adding export PATH=/Users/UserAccountName/npm/bin:$PATH to my ~/.bash_profile and restarting Terminal.app.
I have faced the same problem after installing everything succesfully, I resolved it using the following method creating symbolic links to yo, grunt, bower like the following :
For Yo
praveen#praveen-lenovo:~$ sudo ln -s /home/praveen/.npm-global/bin/yo /usr/bin/yo
For Grunt
praveen#praveen-lenovo:~$ sudo ln -s /home/praveen/.npm-global/bin/grunt /usr/bin/grunt
For Bower
praveen#praveen-lenovo:~$ sudo ln -s /home/praveen/.npm-global/bin/bower /usr/bin/bower
Here in the above commands the common path /home/praveen/.npm-global/bin/ may change according to your system folder structure.
I'm having a problem with my new installation of Node.js (windows 64 bit).
I'm trying to install the express module inside a project of mine but I can't work it out.
I type this command :
npm install -g express
However this is the result of the command
├── escape-html#1.0.1 ├── merge-descriptors#0.0.2 ├── cookie-signature#1.0.5 ├── utils-merge#1.0.0 ├── cookie#0.1.2 ├── range-parser#1.0.2 ├── finalhandler#0.3.2 ├── fresh#0.2.4 ├── media-typer#0.3.0 ├── methods#1.1.0 ├── vary#1.0.0 ├── parseurl#1.3.0 ├── serve-static#1.7.1 ├── content-disposition#0.5.0 ├── path-to-regexp#0.1.3 ├── depd#1.0.0 ├── qs#2.3.3 ├── on-finished#2.1.1 (ee-first#1.1.0) ├── debug#2.1.0 (ms#0.6.2) ├── etag#1.5.1 (crc#3.2.1) ├── send#0.10.1 (destroy#1.0.3, ms#0.6.2, mime#1.2.11) ├── proxy-addr#1.0.4 (forwarded#0.1.0, ipaddr.js#0.1.5) ├── accepts#1.1.4 (negotiator#0.4.9, mime-types#2.0.4) └── type-is#1.5.4 (mime-types#2.0.4)
It's the list of dependecies needed by express but there's no download of them.
The first time I tried to use npm I had this problem (https://github.com/npm/npm/issues/4808)
There were many solutions to solve it, one of them consist in disable the layer ssl for the connection to the npm online registry but I don't think there's a connection between this solution (that I applied) and the problem.
Thank you in advance,
Luca
The express module should be installed on a per project basis.
npm install --save express