spmjs / spm-build

Build tool for spm.
36 stars 27 forks source link

装不起spm-build #39

Closed hqyuan closed 10 years ago

hqyuan commented 10 years ago

npm http GET https://registry.npmjs.org/amdefine npm http GET https://registry.npmjs.org/underscore npm http 304 https://registry.npmjs.org/underscore npm http 304 https://registry.npmjs.org/amdefine /usr/local/bin/spm-build -> /usr/local/lib/node_modules/spm-build/bin/spm-build

spm-build@0.3.12 postinstall /usr/local/lib/node_modules/spm-build node scripts/postinstall.js

EACCES, permission denied '/root/.spm' you need install spm to register the program

$ npm install spm -g

if you have installed spm, it maybe you haven't set a NODE_PATH environment variable

spm-build@0.3.12 /usr/local/lib/node_modules/spm-build ├── spmrc@0.1.3 ├── commander@1.1.1 (keypress@0.1.0) ├── grunt-contrib-clean@0.5.0 (rimraf@2.2.5) ├── grunt-contrib-cssmin@0.6.2 (clean-css@1.1.7, grunt-lib-contrib@0.6.1) ├── spm-grunt@0.1.7 (grunt@0.4.2) ├── grunt@0.4.2 (which@1.0.5, dateformat@1.0.2-1.2.3, eventemitter2@0.4.13, getobject@0.1.0, colors@0.6.2, async@0.1.22, hooker@0.2.3, nopt@1.0.10, rimraf@2.0.3, exit@0.1.2, glob@3.1.21, lodash@0.9.2, coffee-script@1.3.3, underscore.string@2.2.1, minimatch@0.2.14, findup-sync@0.1.2, iconv-lite@0.2.11, js-yaml@2.0.5) ├── grunt-contrib-copy@0.4.1 ├── grunt-contrib-uglify@0.2.7 (grunt-lib-contrib@0.6.1, uglify-js@2.4.8) ├── grunt-cmd-concat@0.2.7 (cmd-util@0.3.12) └── grunt-cmd-transport@0.3.0 (clean-css@1.0.12, css@1.4.4, handlebars@1.0.11, uglify-js@2.2.5, cmd-util@0.3.12)

afc163 commented 10 years ago

读下 log ,给出提示了哦。

hqyuan commented 10 years ago

npm install spm -g 重新装了,没有任何错误。 然后把 /root/.spm 也777了。
再npm install spm-build -g 仍然是这个错

afc163 commented 10 years ago

it maybe you haven't set a NODE_PATH environment variable

这个设置了没

afc163 commented 10 years ago

http://docs.spmjs.org/doc/environment.html#%E8%AE%BE%E7%BD%AE-path-%E5%92%8C-node-path

hqyuan commented 10 years ago

设置了的 echo $NODE_PATH /usr/local/lib/node_modules

afc163 commented 10 years ago

http://docs.spmjs.org/doc/environment.html#%E5%8E%BB%E9%99%A4-sudo 看看这个,估计是这个问题,重新操作下再重新安装一遍

popomore commented 10 years ago

竟然是 root 账户

hqyuan commented 10 years ago

对。用的root