Czy niektórzy radzą, dlaczego dostaję ten błąd podczas robienia git push heroku master na Windows 7 dla podstawowej aplikacji na średnie stosy? Próbuję podstawową aplikację na średnie stosy i wykonałem następujące polecenia, a na końcu polecenie "git push heroku master", które spowodowało błąd - altana instalacyjna
sh: bower: not found, npm ERR! dziwny błąd 127, npm ERR! nie jest w porządku kod 0,! Nie udało się zainstalować --production zależności z KMPMEAN stack, Win 7, git push heroku master wyniki sh: bower: nie znaleziono błąd
cd mean-stack
npm install
pm install -g bower
npm install -g yo grunt-cli [email protected]
bower install
git init
git add .
git status
git add -f public/lib
git commit -m "init"
heroku create
git push heroku master
C:\ss\D1\google\04\mean\mean-stack>git push heroku master
Enter passphrase for key '/c/ss/D1/google/04/eclipse/eclipse/.ssh/id_rsa':
Counting objects: 466, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (448/448), done.
Writing objects: 100% (466/466), 8.61 MiB | 522 KiB/s, done.
Total 466 (delta 55), reused 0 (delta 0)
-----> Node.js app detected
-----> Resolving engine versions
Using Node.js version: 0.10.15
Using npm version: 1.2.30
-----> Fetching Node.js binaries
-----> Vendoring node into slug
-----> Installing dependencies with npm
npm WARN package.json [email protected] No repository field.
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/connect-flash
npm http GET https://registry.npmjs.org/mongoose
npm http GET https://registry.npmjs.org/passport
npm http GET https://registry.npmjs.org/passport-local
....
....
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http 200 https://registry.npmjs.org/sigmund
npm http GET https://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz
npm http 200 https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/lru-cache/-/lru-cache-2.3.1.tgz
npm http 200 https://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz
npm http 200 https://registry.npmjs.org/lru-cache/-/lru-cache-2.3.1.tgz
> [email protected] install /tmp/build_39luvwq9ok8kb/node_modules/connect-mongo/node_modules/mongodb/node_modules/bson
> (node-gyp rebuild 2> builderror.log) || (exit 0)
> [email protected] install /tmp/build_39luvwq9ok8kb/node_modules/mongoose/node_modules/mongodb/node_modules/kerberos
> (node-gyp rebuild 2> builderror.log) || (exit 0)
> [email protected] install /tmp/build_39luvwq9ok8kb/node_modules/mongoose/node_modules/mongodb/node_modules/bson
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory `/tmp/build_39luvwq9ok8kb/node_modules/connect-mongo/node_modules/mongodb/node_modules/bson/build'
CXX(target) Release/obj.target/bson/ext/bson.o
make: Entering directory `/tmp/build_39luvwq9ok8kb/node_modules/mongoose/node_modules/mongodb/node_modules/bson/build'
CXX(target) Release/obj.target/bson/ext/bson.o
make: Entering directory `/tmp/build_39luvwq9ok8kb/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 `/tmp/build_39luvwq9ok8kb/node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/build'
SOLINK_MODULE(target) Release/obj.target/bson.node
SOLINK_MODULE(target) Release/obj.target/bson.node: Finished
COPY Release/bson.node
make: Leaving directory `/tmp/build_39luvwq9ok8kb/node_modules/connect-mongo/node_modules/mongodb/node_modules/bson/build'
SOLINK_MODULE(target) Release/obj.target/bson.node
SOLINK_MODULE(target) Release/obj.target/bson.node: Finished
COPY Release/bson.node
make: Leaving directory `/tmp/build_39luvwq9ok8kb/node_modules/mongoose/node_modules/mongodb/node_modules/bson/build'
> [email protected] postinstall /tmp/build_39luvwq9ok8kb
> bower install
sh: bower: not found
npm ERR! weird error 127
npm ERR! not ok code 0
! Failed to install --production dependencies with npm
! Push rejected, failed to compile Node.js app
To [email protected]:afternoon-spire-6716.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:afternoon-spire-6716.git'
=========== package.json
{
"name": "mean",
"description": "Mongo",
"version": "1.0.0",
"private": false,
"author": "MEAN - A Modern Stack: MongoDB, ExpressJS, AngularJS, NodeJS. (BONUS: Passport User Support).",
"engines": {
"node": "0.10.x",
"npm": "1.2.x"
},
"scripts": {
"start": "NODE_ENV=development ./node_modules/.bin/nodemon server.js",
"test": "NODE_ENV=test ./node_modules/.bin/mocha --reporter spec test/test-*.js",
"postinstall": "./node_modules/bower/bin/bower install"
},
"dependencies": {
"express": "latest",
"jade": "latest",
"mongoose": "latest",
"connect-mongo": "latest",
"connect-flash": "latest",
"passport": "latest",
"passport-local": "latest",
"passport-facebook": "latest",
"passport-twitter": "latest",
"passport-github": "latest",
"passport-google-oauth": "latest",
"underscore": "latest",
"async": "latest",
"view-helpers": "latest",
"mean-logger": "latest"
},
"devDependencies": {
"supertest": "latest",
"should": "latest",
"mocha": "latest",
"bower": "latest",
"grunt": "~0.4.1",
"grunt-contrib-compass": "~0.3.0",
"grunt-contrib-watch": "~0.4.4",
"grunt-contrib-jshint": "~0.6.0",
"grunt-nodemon": "0.0.8",
"grunt-concurrent": "~0.3.0"
}
}
======== = bower.json
{
"name": "angularJS-IL",
"version": "1.0.0",
"dependencies": {
"bootstrap": "2.3.2",
"angular": "~1.0.6",
"angular-resource": "~1.0.6",
"angular-cookies": "~1.0.6",
"angular-bootstrap": "~0.4.0",
"json3": "~3.2.4",
"jquery": "~1.9.1"
},
"devDependencies": {
"angular-mocks": "~1.0.5",
"angular-scenario": "~1.0.5"
}
}
==============. bowerrc
{
"directory": "public/lib",
"json": "bower.json"
}
Następnie, w jaki sposób instaluje się komponenty altanowe? – Shamoon
Nie należy go usuwać! Zmień go na "po instalacji": "węzeł ./node_modules/bower/bin/bower install" –
Kiedy to zrobię, otrzymuję nowy błąd: 'Błąd: Nie mogę znaleźć modułu '/ tmp/build_03cb7334-ccf6-4038-95c7- cf41e814cd4f/node_modules/bower/bin/bower''' –