Ich versuche, ein MEAN-Projekt einzurichten, aber kann nicht scheinen, den Generator zu arbeiten. Ich installierte die meanjs
Generator mit dem folgenden Befehl:Yo MEAN Generator Crashs
npm -g install generator-meanjs
Ich lief yo meanjs
und beantwortet die Fragen über meine Anwendung, aber der Generator immer abstürzt.
Dies ist die Botschaft, die ich erhalten:
Running npm install for you....
This may take a couple minutes.
Error: Command failed: /bin/sh -c cd mean && npm install
npm WARN deprecated [email protected]: Package renamed to phantomjs-prebuilt. Please update 'phantomjs' package references to 'phantomjs-prebuilt'
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to [email protected]^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to [email protected]^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: [email protected]<3.0.0 is no longer maintained. Upgrade to [email protected]^4.0.0.
npm WARN deprecated [email protected]: to-iso-string has been deprecated, use @segment/to-iso-string instead.
Killed
at ChildProcess.exithandler (child_process.js:213:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:827:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:477:12)
ich alle MEAN Version Optionen und nichts geändert hat versucht haben. Unten ist meine Ordnerstruktur nach dem Ausführen des Befehls:
bower.json Dockerfile LICENSE.md package.json README.md
config gruntfile.js manifest.yml Procfile scripts
CONTRIBUTING.md gulpfile.js modules protractor.conf.js server.js
docker-compose.yml karma.conf.js node_modules public test.js
ich in der Lage war, indem Sie in der erste Warnung zu beheben, um die phantomjs
Abhängigkeit phantomjs-prebuilt
und rerunning npm install
package.json und umbenennen. Aber ich kann die anderen in der Datei erwähnten Abhängigkeiten nicht finden und weiß nicht einmal, ob diese Lösung mein Problem beheben wird.
Ich benutze Ubuntu 14 und habe Python 2.7 (etwas ich habe Forschung angedeutet, dass dies wichtig sein könnte, nur für den Fall).
EDIT
Eine weitere Sache: wenn der meanjs Generators Installation ich zwei deprecation Warnungen bekommen ... hätte nicht gedacht, das das Problem verursachen würde, aber könnte dies die Ursache sein?
[email protected]:~# npm install -g generator-meanjs
npm WARN deprecated [email protected]: cross-spawn no longer requires a build toolchain, use it instead!
npm WARN deprecated [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm
Und hier ist meine package.json
Datei:
{
"name": "mean",
"description": "Full-Stack JavaScript with MongoDB, Express, AngularJS, and Node.js",
"version": "0.4.2",
"meanjs-version": "0.4.2",
"private": false,
"author": "Danny",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/meanjs/mean.git"
},
"engines": {
"node": ">=0.10.28",
"npm": ">=1.4.28"
},
"scripts": {
"start": "grunt",
"test": "grunt test",
"postinstall": "bower install --config.interactive=false"
},
"dependencies": {
"acl": "~0.4.4",
"async": "^1.3.0",
"body-parser": "^1.13.1",
"bower": "^1.4.1",
"cfenv": "~1.0.0",
"chalk": "^1.1.0",
"compression": "^1.5.0",
"connect-flash": "~0.1.1",
"connect-mongo": "~0.8.1",
"consolidate": "~0.13.1",
"cookie-parser": "^1.3.2",
"crypto": "0.0.3",
"express": "^4.13.1",
"express-session": "^1.11.3",
"file-stream-rotator": "~0.0.6",
"forever": "~0.14.2",
"generate-password": "^1.1.1",
"glob": "^5.0.13",
"grunt": "0.4.5",
"grunt-cli": "~0.1.13",
"helmet": "~0.9.1",
"jasmine-core": "^2.3.4",
"lodash": "^3.10.0",
"method-override": "^2.3.3",
"mocha": "~1.20.0",
"mongoose": "~4.2.3",
"morgan": "^1.6.1",
"multer": "~1.0.5",
"nodemailer": "^1.4.0",
"owasp-password-strength-test": "^1.3.0",
"passport": "~0.2.2",
"passport-facebook": "^2.0.0",
"passport-github": "~0.1.5",
"passport-google-oauth": "~0.2.0",
"passport-linkedin": "~0.1.3",
"passport-local": "^1.0.0",
"passport-paypal-openidconnect": "^0.1.1",
"passport-twitter": "^1.0.2",
"phantomjs": ">=1.9.0",
"serve-favicon": "^2.3.0",
"socket.io": "^1.3.7",
"swig": "^1.4.2",
"validator": "^3.41.2"
},
"devDependencies": {
"coveralls": "^2.11.4",
"grunt-concurrent": "^2.0.0",
"grunt-contrib-copy": "~0.8.0",
"grunt-contrib-csslint": "~0.4.0",
"grunt-contrib-cssmin": "~0.12.3",
"grunt-contrib-jshint": "~0.11.2",
"grunt-contrib-less": "^1.0.1",
"grunt-contrib-sass": "~0.9.2",
"grunt-contrib-uglify": "~0.9.1",
"grunt-contrib-watch": "~0.6.1",
"grunt-env": "~0.4.4",
"grunt-eslint": "~17.3.1",
"grunt-karma": "~0.11.2",
"grunt-mocha-istanbul": "^2.4.0",
"grunt-mocha-test": "~0.12.7",
"grunt-ng-annotate": "^1.0.1",
"grunt-node-inspector": "~0.3.0",
"grunt-nodemon": "~0.4.0",
"grunt-protractor-coverage": "~0.2.15",
"grunt-protractor-runner": "^2.1.0",
"gulp": "^3.9.0",
"gulp-angular-templatecache": "^1.7.0",
"gulp-autoprefixer": "^2.3.1",
"gulp-concat": "^2.6.0",
"gulp-csslint": "~0.1.5",
"gulp-cssmin": "~0.1.7",
"gulp-eslint": "~1.0.0",
"gulp-jshint": "^1.11.2",
"gulp-karma": "~0.0.4",
"gulp-less": "^3.0.3",
"gulp-livereload": "^3.8.0",
"gulp-load-plugins": "^1.0.0-rc.1",
"gulp-mocha": "^2.1.2",
"gulp-ng-annotate": "^1.0.0",
"gulp-nodemon": "^2.0.3",
"gulp-protractor": "^1.0.0",
"gulp-rename": "^1.2.2",
"gulp-sass": "^2.0.3",
"gulp-uglify": "^1.2.0",
"gulp-util": "^3.0.6",
"karma": "~0.12.37",
"karma-chrome-launcher": "~0.2.0",
"karma-coverage": "~0.4.2",
"karma-firefox-launcher": "~0.1.6",
"karma-jasmine": "~0.3.6",
"karma-ng-html2js-preprocessor": "^0.1.2",
"karma-phantomjs-launcher": "~0.2.0",
"load-grunt-tasks": "^3.2.0",
"mock-fs": "~3.4.0",
"run-sequence": "^1.1.1",
"should": "^7.0.1",
"supertest": "^1.0.1"
}
}
ANOTHER EDIT
Okay, so konnte ich die Pakete bekommen installiert (glaube ich) von meinem npm Cache zu löschen, und läuft yo meanjs --skip0install
. Danach klont das Repo, ich lief sudo npm install
und erhielt nicht die KILLED
Nachricht, die ich oben erwähnt habe. Jedoch sind alle Warnungen und Hinweise zu veralteten Versionen bleiben, und wenn ich den Lauf um den Server mit grunt
versuchen, erhalte ich:
grunt-cli: The grunt command line interface (v1.2.0)
Fatal error: Unable to find local grunt.
If you're seeing this message, grunt hasn't been installed locally to
your project. For more information about installing and configuring grunt,
please see the Getting Started guide:
Ich versuchte Grunzen manuell mit npm install grunt-cli
Installation aber ich erhalte die gleiche Meldung. Ich habe bemerkt, dass alle Grunt-Tools Referenz in package.json
sind, also frage ich mich, ob vielleicht die devDependencies nicht installiert werden.
Und jetzt bin ich immer Speicherlecks ....
(node:11181) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit
Wie ist das so vermasselt?
haben Sie versucht, den repo von github stattdessen zu klonen? – amyloula
Das Klonen scheint zu funktionieren, es sind die Knotenpakete, die versauen. Ich kann es mit 'yo mean-js - skip-install' machen. –
sehr seltsam, ich werde eine Kopie von meinem package.json für Sie zu prüfen, gegen, wie ich keine Installationsprobleme – amyloula