Monday 14 December 2015

Global Modules not running

I'm having issues on one of my servers (CentOS).Node is updated to the latest version and global modules aren't working - I'm not really sure if they ever have.The install used to work fine and give no errors.. but now I get this[nhyland@natdm ~]$ sudo npm install -g babel-cli [sudo] password for nhyland: npm http GET http://ift.tt/1m2CMIx npm http 304 http://ift.tt/1m2CMIx npm ERR! error rolling back Error: Refusing to delete: /usr/local/n/versions/node/4.0.0/bin/babel not in /usr/local/n/versions/node/4.0.0/lib/node_modules/babel-cli npm ERR! error rolling back at clobberFail (/usr/lib/node_modules/npm/lib/utils/gently-rm.js:41:12) npm ERR! error rolling back at next (/usr/lib/node_modules/npm/lib/utils/gently-rm.js:27:14) npm ERR! error rolling back at /usr/lib/node_modules/npm/lib/utils/gently-rm.js:36:12 npm ERR! error rolling back at FSReqWrap.oncomplete (fs.js:82:15) npm ERR! error rolling back babel-cli@6.3.17 { [Error: Refusing to delete: /usr/local/n/versions/node/4.0.0/bin/babel not in /usr/local/n/versions/node/4.0.0/lib/node_modules/babel-cli] npm ERR! error rolling back code: 'EEXIST', npm ERR! error rolling back path: '/usr/local/n/versions/node/4.0.0/bin/babel' } npm ERR! Refusing to delete: /usr/local/n/versions/node/4.0.0/bin/babel not in /usr/local/n/versions/node/4.0.0/lib/node_modules/babel-cli File exists: /usr/local/n/versions/node/4.0.0/bin/babel Move it away, and try again. npm ERR! System Linux 2.6.32-042stab092.3 npm ERR! command "/usr/local/n/versions/node/4.0.0/bin/node" "/usr/bin/npm" "install" "-g" "babel-cli" npm ERR! cwd /home/nhyland npm ERR! node -v v4.0.0 npm ERR! npm -v 1.3.6 npm ERR! path /usr/local/n/versions/node/4.0.0/bin/babel npm ERR! code EEXIST npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/nhyland/npm-debug.log npm ERR! not ok code 0 [nhyland@natdm ~]$ babel -bash: babel: command not found [nhyland@natdm ~]$ node -v v5.2.0 [nhyland@natdm ~]$ npm -v 3.3.12 Why is it going to 4.0? Do I have to change something?Edit: I removed /usr/local/n/versions/node/4.0.0/bin/babel and a few other folders it complained about and ran the same install command and it worked fine, but I still can't run it..[nhyland@natdm ~]$ sudo rm -rf /usr/local/n/versions/node/4.0.0/bin/babel-node [nhyland@natdm ~]$ sudo npm install -g babel-cli npm http GET http://ift.tt/1m2CMIx npm http 304 http://ift.tt/1m2CMIx [...] npm ERR! error rolling back babel-cli@6.3.17 { [Error: Refusing to delete: /usr/local/n/versions/node/4.0.0/bin/babel-external-helpers not in /usr/local/n/versions/node/4.0.0/lib/node_modules/babel-cli] npm ERR! error rolling back code: 'EEXIST', npm ERR! error rolling back path: '/usr/local/n/versions/node/4.0.0/bin/babel-external-helpers' } npm ERR! Refusing to delete: /usr/local/n/versions/node/4.0.0/bin/babel-external-helpers not in /usr/local/n/versions/node/4.0.0/lib/node_modules/babel-cli File exists: /usr/local/n/versions/node/4.0.0/bin/babel-external-helpers Move it away, and try again. [...] npm ERR! not ok code 0 [nhyland@natdm ~]$ sudo rm -rf /usr/local/n/versions/node/4.0.0/bin/babel-external-helpers [nhyland@natdm ~]$ sudo npm install -g babel-cli [...] babel-cli@6.3.17 /usr/local/n/versions/node/4.0.0/lib/node_modules/babel-cli ├── slash@1.0.0 ├── log-symbols@1.0.2 ├── path-is-absolute@1.0.0 ├── path-exists@1.0.0 ├── fs-readdir-recursive@0.1.2 ├── convert-source-map@1.1.2 ├── v8flags@2.0.10 (user-home@1.1.1) ├── commander@2.9.0 (graceful-readlink@1.0.1) ├── chalk@1.1.1 (escape-string-regexp@1.0.3, supports-color@2.0.0, ansi-styles@2.1.0, has-ansi@2.0.0, strip-ansi@3.0.0) ├── output-file-sync@1.1.1 (xtend@4.0.1, mkdirp@0.5.1) ├── glob@5.0.15 (inherits@2.0.1, once@1.3.3, inflight@1.0.4, minimatch@3.0.0) ├── chokidar@1.4.1 (glob-parent@2.0.0, async-each@0.1.6, inherits@2.0.1, is-glob@2.0.1, is-binary-path@1.0.1, readdirp@2.0.0, anymatch@1.3.0) ├── bin-version-check@2.1.0 (minimist@1.2.0, semver-truncate@1.1.0, semver@4.3.6, bin-version@1.0.4) ├── source-map@0.5.3 ├── babel-core@6.3.17 (shebang-regex@1.0.0, babel-template@6.3.13, babel-messages@6.3.18, babel-helpers@6.3.13, private@0.1.6, debug@2.2.0, minimatch@2.0.10, babel-code-frame@6.3.13, babel-types@6.3.18, babylon@6.3.18, babel-generator@6.3.19, babel-traverse@6.3.19, json5@0.4.0) ├── request@2.67.0 (is-typedarray@1.0.0, aws-sign2@0.6.0, forever-agent@0.6.1, caseless@0.11.0, stringstream@0.0.5, tunnel-agent@0.4.2, oauth-sign@0.8.0, isstream@0.1.2, json-stringify-safe@5.0.1, extend@3.0.0, combined-stream@1.0.5, node-uuid@1.4.7, qs@5.2.0, mime-types@2.1.8, form-data@1.0.0-rc3, tough-cookie@2.2.1, bl@1.0.0, har-validator@2.0.3, http-signature@1.1.0, hawk@3.1.2) ├── lodash@3.10.1 ├── babel-register@6.3.13 (home-or-tmp@1.0.0, source-map-support@0.2.10, core-js@1.2.6) ├── babel-runtime@5.8.34 (core-js@1.2.6) └── babel-polyfill@6.3.14 (babel-regenerator-runtime@6.3.13, core-js@1.2.6) [nhyland@natdm ~]$ babel -bash: babel: command not found [nhyland@natdm ~]$

Submitted December 14, 2015 at 11:38PM by natdm

No comments:

Post a Comment