2017-06-23 8 views
0

私は初めてwebpackで私のangular2アプリケーションを開始したいと思います:パスの文字列でなければなりません。未定義のWebPACKを受け取っ:コンパイルに失敗し、それはpackage.json`パスのERRORは文字列でなければなりません。受け取られた未定義のwebpack:コンパイルに失敗しました

{ 
    "name": "angular2-webpack-starter", 
    "version": "1.0.0", 
    "description": "An Angular 2 Webpack Starter kit featuring Angular 2 (Router, Http, Forms, Services, Tests, E2E, Coverage), Karma, Protractor, Jasmine, Istanbul, TypeScript, and Webpack by AngularClass", 
    "author": "Patrick Stapleton <[email protected]>", 
    "homepage": "https://github.com/angularclass/angular2-webpack-starter", 
    "license": "MIT", 
    "scripts": { 
    "clean": "npm cache clean && rimraf node_modules doc typings coverage dist", 
    "clean:dist": "rimraf dist", 
    "preclean:install": "npm run clean", 
    "clean:install": "npm set progress=false && npm install", 
    "preclean:start": "npm run clean", 
    "clean:start": "npm start", 
    "watch": "npm run watch:dev", 
    "watch:dev": "webpack --watch --progress --profile --colors --display-error-details --display-cached", 
    "watch:test": "npm run test -- --auto-watch --no-single-run", 
    "watch:prod": "webpack --watch --config webpack.prod.config.js --progress --profile --colors --display-error-details --display-cached", 
    "build": "npm run build:dev", 
    "prebuild:dev": "npm run clean:dist", 
    "build:dev": "webpack --progress --profile --colors --display-error-details --display-cached", 
    "prebuild:prod": "npm run clean:dist", 
    "build:prod": "webpack --config webpack.prod.config.js --progress --profile --colors --display-error-details --display-cached", 
    "server": "npm run server:dev", 
    "server:dev": "webpack-dev-server --progress --profile --colors --display-error-details --display-cached --content-base src/", 
    "server:prod": "http-server dist --cors", 
    "webdriver:update": "webdriver-manager update", 
    "webdriver:start": "webdriver-manager start", 
    "lint": "tsconfig-lint", 
    "pree2e": "npm run webdriver:update -- --standalone", 
    "e2e": "ts-node node_modules/.bin/protractor", 
    "e2e:live": "protractor --elementExplorer", 
    "test": "karma start", 
    "ci": "npm run e2e && npm run test", 
    "docs": "typedoc --options typedoc.json --exclude **/*.spec.ts ./src/", 
    "start": "npm run server:dev", 
    "fix:ng2-clean": "node_modules/.bin/rimraf node_modules/angular2/manual_typings node_modules/angular2/typings node_modules/angular2/bundles/typings", 
    "fix:ng2": "npm run fix:ng2-clean", 
    "pretypings-install": "npm run fix:ng2", 
    "typings-install": "typings install", 
    "postinstall": "npm run typings-install", 
    "preversion": "npm test", 
    "version": "npm run build", 
    "postversion": "git push && git push --tags" 
    }, 
    "dependencies": { 
    "angular2": "2.0.0-beta.2", 
    "es6-promise": "^3.0.2", 
    "es6-shim": "^0.33.3", 
    "es7-reflect-metadata": "^1.5.5", 
    "rxjs": "5.0.0-beta.0", 
    "zone.js": "0.5.10" 
    }, 
    "devDependencies": { 
    "compression-webpack-plugin": "^0.3.0", 
    "copy-webpack-plugin": "^1.1.1", 
    "css-loader": "^0.23.1", 
    "es6-promise-loader": "^1.0.1", 
    "exports-loader": "^0.6.2", 
    "expose-loader": "^0.7.1", 
    "file-loader": "^0.8.5", 
    "html-webpack-plugin": "^1.7.0", 
    "http-server": "^0.8.5", 
    "imports-loader": "^0.6.5", 
    "istanbul-instrumenter-loader": "^0.1.3", 
    "json-loader": "^0.5.4", 
    "karma": "^0.13.19", 
    "karma-chrome-launcher": "^0.2.2", 
    "karma-coverage": "^0.5.3", 
    "karma-jasmine": "^0.3.6", 
    "karma-mocha-reporter": "^1.1.5", 
    "karma-phantomjs-launcher": "^1.0.0", 
    "karma-sourcemap-loader": "^0.3.7", 
    "karma-webpack": "1.7.0", 
    "ncp": "^2.0.0", 
    "phantomjs-polyfill": "0.0.1", 
    "phantomjs-prebuilt": "^2.1.3", 
    "protractor": "^3.0.0", 
    "raw-loader": "0.5.1", 
    "reflect-metadata": "0.1.2", 
    "remap-istanbul": "^0.5.1", 
    "rimraf": "^2.5.1", 
    "source-map-loader": "^0.1.5", 
    "style-loader": "^0.13.0", 
    "stylus": "^0.54.5", 
    "stylus-loader": "^2.4.0", 
    "ts-helper": "0.0.1", 
    "ts-loader": "^0.8.0", 
    "ts-node": "^0.5.5", 
    "tsconfig-lint": "^0.5.0", 
    "tslint": "^3.3.0", 
    "tslint-loader": "^2.1.0", 
    "typedoc": "^0.3.12", 
    "typescript": "^1.7.5", 
    "typings": "^0.6.3", 
    "url-loader": "^0.5.7", 
    "webpack": "^1.14.0", 
    "webpack-dev-server": "^1.14.1", 
    "webpack-md5-hash": "0.0.4" 
    }, 
    "repository": { 
    "type": "git", 
    "url": "https://github.com/angularclass/angular2-webpack-starter.git" 
    }, 
    "bugs": { 
    "url": "https://github.com/angularclass/angular2-webpack-starter/issues" 
    }, 
    "engines": { 
    "node": ">= 4.2.1 <= 5", 
    "npm": ">= 3" 
    } 
} 

だ君たちは私を助けることができ、何をすべきかIDK?すべてが正常であるようです。」

+0

Angular CLIの使用を検討しましたか? WebpackでAngularプロジェクトをセットアップし、すべての設定を処理します。 – DeborahK

答えて

0

この問題はノード6以上に関連しています。代わりにノード5.xのためにそれを変更することはおそらく問題を解決するでしょう。

関連する問題