2014-11-17 19 views
6

'u takip ederken hata mesajı Ortalama Yığın (ortalama.io) tüm modüllerini kurmanın çeşitli bir yolu var gibi görünüyor. Bununla birlikte, c9.io'da bunu yapmanın en iyi yolu nedir? Çok fazla şey deniyorum ama hepsini almam gibi görünmüyorum. c9.io, NodeJ'ler için özel çalışma alanlarına ve Angular.js'yi kurmanın bir yoluna sahiptir, ancak hepsini hızlı, kolay ve hızlı bir şekilde istiyorum!MEAN yığınını cloud9'a kurmanın en iyi yolu nedir? Elkitabı

Not: Ben, yeni bir çalışma alanı (node.js) oluşturmaya çalıştık tüm dosyaları silinir ve aşağıdaki bağlantıdan verildiği şekilde komutları çalıştırın:

: Ancak http://learn.mean.io/#mean-installation

, aşağıdaki hata iletisi aldım

[email protected]:~/workspace $ cd app && npm install 

> [email protected] preinstall /home/ubuntu/workspace/app/node_modules/meanio 
> node ./scripts/preinstall 

npm WARN engine [email protected]: wanted: {"node":"0.10.x","npm":"2.1.x"} (current: {"node":"0.10.33","npm":"1.4.28"}) 

> [email protected] postinstall /home/ubuntu/workspace/app/node_modules/meanio/node_modules/mean-health 
> node ./postinstall.js 


> [email protected] preinstall /home/ubuntu/workspace/app/node_modules/meanio/node_modules/mean-cli 
> node ./scripts/preinstall 

npm WARN optional dep failed, continuing [email protected] 
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.33","npm":"1.4.28"}) 
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.33","npm":"1.4.28"}) 
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.33","npm":"1.4.28"}) 
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.33","npm":"1.4.28"}) 
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.33","npm":"1.4.28"}) 
npm WARN engine [email protected].10.2: wanted: {"node":"0.8.x"} (current: {"node":"0.10.33","npm":"1.4.28"}) 

> [email protected] install /home/ubuntu/workspace/app/node_modules/karma-phantomjs-launcher/node_modules/phantomjs 
> node install.js 

Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2 
Saving to /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2 
Receiving... 
/[==============--------------------------] 36% 0.0s\ 
Received 12854K total. 
Extracting tar contents (via spawned process) 
Removing /home/ubuntu/workspace/app/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom 
Copying extracted folder /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2-extract-1416576264996/phantomjs-1.9.8-linux-x86_64 -> /home/ubuntu/workspace/app/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom 
Removing /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2-extract-1416576264996 
Writing location.js file 
Done. Phantomjs binary available at /home/ubuntu/workspace/app/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/bin/phantomjs 
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.33","npm":"1.4.28"}) 
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.33","npm":"1.4.28"}) 
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.33","npm":"1.4.28"}) 
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.33","npm":"1.4.28"}) 
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.33","npm":"1.4.28"}) 

> [email protected] install /home/ubuntu/workspace/app/node_modules/mongoose/node_modules/mongodb/node_modules/kerberos 
> (node-gyp rebuild 2> builderror.log) || (exit 0) 

make: Entering directory `/home/ubuntu/workspace/app/node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/build' 
    SOLINK_MODULE(target) Release/obj.target/kerberos.node 
    SOLINK_MODULE(target) Release/obj.target/kerberos.node: Finished 
    COPY Release/kerberos.node 
make: Leaving directory `/home/ubuntu/workspace/app/node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/build' 
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.33","npm":"1.4.28"}) 
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.33","npm":"1.4.28"}) 
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.33","npm":"1.4.28"}) 
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.33","npm":"1.4.28"}) 

> [email protected] install /home/ubuntu/workspace/app/node_modules/mongoose/node_modules/mongodb/node_modules/bson 
> (node-gyp rebuild 2> builderror.log) || (exit 0) 

make: Entering directory `/home/ubuntu/workspace/app/node_modules/mongoose/node_modules/mongodb/node_modules/bson/build' 
    CXX(target) Release/obj.target/bson/ext/bson.o 
    SOLINK_MODULE(target) Release/obj.target/bson.node 
    SOLINK_MODULE(target) Release/obj.target/bson.node: Finished 
    COPY Release/bson.node 
make: Leaving directory `/home/ubuntu/workspace/app/node_modules/mongoose/node_modules/mongodb/node_modules/bson/build' 

> [email protected] install /home/ubuntu/workspace/app/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws 
> (node-gyp rebuild 2> builderror.log) || (exit 0) 

make: Entering directory `/home/ubuntu/workspace/app/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build' 
    CXX(target) Release/obj.target/bufferutil/src/bufferutil.o 
    SOLINK_MODULE(target) Release/obj.target/bufferutil.node 
    SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished 
    COPY Release/bufferutil.node 
    CXX(target) Release/obj.target/validation/src/validation.o 
    SOLINK_MODULE(target) Release/obj.target/validation.node 
    SOLINK_MODULE(target) Release/obj.target/validation.node: Finished 
    COPY Release/validation.node 
make: Leaving directory `/home/ubuntu/workspace/app/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build' 
npm ERR! Error: EACCES, mkdir '/home/ubuntu/.npm/mongodb/1.3.23' 
npm ERR! { [Error: EACCES, mkdir '/home/ubuntu/.npm/mongodb/1.3.23'] 
npm ERR! errno: 3, 
npm ERR! code: 'EACCES', 
npm ERR! path: '/home/ubuntu/.npm/mongodb/1.3.23', 
npm ERR! parent: 'connect-mongo' } 
npm ERR! 
npm ERR! Please try running this command again as root/Administrator. 

npm ERR! System Linux 3.14.13-c9 
npm ERR! command "/home/ubuntu/.nvm/v0.10.33/bin/node" "/home/ubuntu/.nvm/v0.10.33/bin/npm" "install" 
npm ERR! cwd /home/ubuntu/workspace/app 
npm ERR! node -v v0.10.33 
npm ERR! npm -v 1.4.28 
npm ERR! path /home/ubuntu/.npm/mongodb/1.3.23 
npm ERR! code EACCES 
npm ERR! errno 3 
npm ERR! stack Error: EACCES, mkdir '/home/ubuntu/.npm/mongodb/1.3.23' 
npm ERR! not ok code 0 

cevap

7

mean.io'nun web sitesinde açıkladığı şekilde, mean.io'yu Cloud9'a yükleyebilirsiniz. Basitçe size senkronizasyon ve varsayılan dosyaları silmek sonra yeni NodeJS projesi oluşturmak terminali vadede:

sudo npm install -g mean-cli 
mean init yourNewApp 

(dan mean.io web sitesi)

DÜZENLEME: EACCES hatası sahip sebebiyle köküne oluştuğunu O /home/ubuntu/.npm/mongodb klasörünün sahipliği. Sen çalıştırarak bunları düzeltebilirsiniz: Ben kendi kurulum NPM tam bu düzeltme sonrasında işe yaramadı yüklemek fark

sudo chown $(whoami). ~/.npm/* 

nedeniyle bazı yarım yüklü paketlere. Yukarıdaki komutu çalıştırdıktan sonra hata almaya devam ederseniz, proje klasörünüzde aşağıdakileri yapın:

rm -rf ./node_modules 
npm install 
+0

Hepsi bu kadar mı? Angular.js vb? Çünkü Angular anlarsam PHP çalışma alanını gerektirir. – JohnAndrews

+3

AngularJS, tüm Javascript ve HTML kodları gibi belirli bir çalışma alanına ihtiyaç duymaz. NodeJS çalışma alanında iyi çalışır. – Tim

+0

Sesler simpel! Şimdi deniyorum ... – JohnAndrews

İlgili konular