私はMEANプロジェクトをセットアップしようとしていますが、ジェネレータを動作させるように見えません。私は、次のコマンドを使用してmeanjs
発電機を設置:Yo MEAN Generator Crashes
npm -g install generator-meanjs
私はyo meanjs
を実行し、自分のアプリケーションについての質問に答えますが、発電機は常にクラッシュします。
これは私が受け取るメッセージです:私はすべてのMEANバージョンのオプションを試してみましたし、何も変わっていません
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 to[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)
。以下は私のフォルダ構造は、コマンドを実行した後です:
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
私はpackage.jsonしに行くとphantomjs-prebuilt
にphantomjs
依存関係の名前を変更し、npm install
を再実行して最初の警告を修正することができました。しかし、私はファイルに記載されている他の依存関係を見つけることができず、この解決策が私の問題を解決するかどうかわからない。
私はUbuntu 14を実行していて、Python 2.7を持っています(私は、これがちょうどそのために重要かもしれないとの調査をしています)。
EDIT
もう一つ:私は2回の非推奨の警告を取得meanjs発電機を設置する際に...これが問題を起こすとは思わなかったけど、これが犯人だろうか?
[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
そして、ここでは私のpackage.json
ファイルです:
{
"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
わかりましたので、私は私のNPMのキャッシュをクリアし、yo meanjs --skip0install
を実行して、インストールされたパッケージを(と思う)を取得することができました。その後、私はsudo npm install
を実行し、上記のKILLED
メッセージを受信しませんでした。しかし、すべての警告および非推奨の通知が残っている、と私はgrunt
でサーバを実行しようとすると、私が取得:
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:
私はnpm install grunt-cli
して手動で面倒をインストールしようとしたが、私は、同じメッセージが表示されます。私はすべてのツールがpackage.json
で参照されているので、devDependenciesがインストールされていないのではないかと思っています。
そして今、私はこれがそう台無しにされてどのように
(node:11181) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit
....メモリリークを取得していますか?
代わりにgithubからレポをクローンしてみましたか? – amyloula
クローニングが正常に機能しているように見えますが、ノードパッケージがうんざりしています。私は 'yo mean-js --skip-install'でそれを得ることができます。 –
非常に奇妙なものですが、インストールの問題がないので、あなたがチェックするpackage.jsonのコピーを残します – amyloula