spm-build安装失败问题

前言

安装npm,spm后, 安装spm-build失败,NODE_PATH我也已经配置过了.
学习笔记,以备查阅.

Author duangr

WebSite http://my.oschina.net/duangr/blog/380234

相关环境

  • OS X: 10.10.1
  • spm 2.2.12

问题现象

$ sudo npm install [email protected] -g
Password:
/usr/local/bin/spm-build -> /usr/local/lib/node_modules/spm-build/bin/spm-build

> [email protected] postinstall /usr/local/lib/node_modules/spm-build
> node scripts/postinstall.js

EACCES, permission denied '/Users/duangr/.spm/plugins.json'
  you need install [email protected] to register the program

    $ npm install [email protected] -g

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

[email protected] /usr/local/lib/node_modules/spm-build
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected]
└── [email protected] ([email protected])

解决方案

$ chmod 775 ~/.spm/*
$ sudo npm install [email protected] -g

参考资料

  • Node 环境配置
  • 构建工具

你可能感兴趣的:(spm-build安装失败问题)