简体   繁体   English

Rails的ShareTribe。 npm安装时出错(ubuntu 16.04)

[英]Rails-ShareTribe. Error on npm install (ubuntu 16.04)

I'm very beginner on Ruby and Ruby on Rails and i just managed to install RonR my server. 我是Ruby和Ruby on Rails的初学者,我只是设法安装RonR我的服务器。 My problem is, when i try to install a platform called ShareTribe , although everything went just fine until bunde install , npm install came with this error: 我的问题是,当我尝试安装一个名为ShareTribe的平台时,虽然一切都很好,直到bunde install ,npm install出现了这个错误:

npm ERR! Linux 4.4.0-21-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! code EBADPLATFORM

npm ERR! notsup Unsupported
npm ERR! notsup Not compatible with your operating system or architecture: fsevents@1.0.12
npm ERR! notsup Valid OS:    darwin
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   linux
npm ERR! notsup Actual Arch: x64

npm ERR! Please include the following file with any support request:
npm ERR!     /home/srv/rails/sharetribe/client/npm-debug.log

npm ERR! Linux 4.4.0-21-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! code ELIFECYCLE
npm ERR! @ postinstall: `cd client && npm install`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ postinstall script 'cd client && npm install'.
npm ERR! This is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cd client && npm install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs 
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! 
npm ERR!     npm owner ls 
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/srv/rails/sharetribe/npm-debug.log`

What i realized is that My os causes that (Darwin aka. Mac OSX is the valid os) 我意识到我的操作系统会导致这种情况(Darwin aka.Mac OSX是有效的操作系统)

Is my guess right? 我猜对了吗? If yes, is there any way to install the platform on Ubuntu? 如果是的话,有没有办法在Ubuntu上安装平台? If not, how can i correct this error? 如果没有,我该如何纠正这个错误?

Thank you in advance! 先感谢您!

You must install all the requirement within the same version 您必须在同一版本中安装所有要求

make sure your npm path is registered, you can use the following 确保您的npm路径已注册,您可以使用以下内容

export PATH="/Users/{YOUR_USER_NAME}/.npm-packages/bin/:$PATH" 

now you can install nvm using the following code 现在您可以使用以下代码安装nvm

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.9/install.sh | bash

and write the following to load the NVM and set the required version for sharetribe 并编写以下内容以加载NVM并为sharetribe设置所需的版本

export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && nvm alias default 7.8.0

Hope this would help 希望这会有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM