Nodejs安装adonis-framework get错误

时间:2016-09-22 09:22:28

标签: javascript node.js adonis.js

当我尝试创建简单的项目作为adonis新的awesome项目我得到错误:

adonis new awesome-project

Cloning into 'awesome-project'...
cleaning project
setting up app key
Fixing ace file
installing dependencies may take a while
installing dependencies... |
> spawn-sync@1.0.15 postinstall /home/mahdi/Desktop/Home/www/adonisjs/awesome-project/node_modules/spawn-sync
> node postinstall

installing dependencies... | ERR! Linux 3.19.0-32-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.5.0
npm ERR! npm  v2.15.9
npm ERR! code EBADPLATFORM

npm ERR! notsup Unsupported
npm ERR! notsup Not compatible with your operating system or architecture: fsevents@1.0.14
npm ERR! notsup Valid OS:    darwin
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   linux
npm ERR! notsup Actual Arch: x64
installing dependencies... /
npm ERR! Please include the following file with any support request:
npm ERR!     /home/mahdi/Desktop/Home/www/adonisjs/awesome-project/npm-debug.log
undefined
mahdi@HP-EliteBook:/var/www/adonisjs$ 

我的linux操作系统是ubuntu,我很熟悉nodejs,我没有遇到任何问题

1 个答案:

答案 0 :(得分:2)

来自adonis文档:Node.js 4.0或更高版本。 npm 3.0或更高版本。

您必须将npm版本升级为 3.8.9 才能解决问题。 (npm install -g npm@3.8.9

如果版本较高,似乎会出现同样的问题。

相关链接:https://github.com/adonisjs/adonis-framework/issues/161 / https://github.com/npm/npm/issues/12647