我分叉这个项目:
https://github.com/preboot/angular-webpack.git
我的项目在SystemJS上,我想将它迁移到webpack。所以我将我的组件复制到新结构,我从旧项目中复制我的依赖项。
首先我执行npm install,下载dep时一切都很好。后来,我做了npm开始,我发现了这个错误:
$ npm start
> app@0.0.0 start C:\Node.js\project-oak\angular-webpack
> npm run server
> app@0.0.0 server C:\Node.js\project-oak\angular-webpack
> webpack-dev-server --inline --progress --port 8080
10% building modules 3/3 modules 0 active
Project is running at http://localhost:8080/
webpack output is served from http://localhost:8080/
Content not from webpack is served from ./src/public
404s will fallback to /index.html
10% building modules 6/10 modules 4 active ...gular-webpack\node_modules\url\url.js
[at-loader] Using typescript@2.2.2 from typescript and "tsconfig.json" from C:\Node.js\project-oak\angular-webpack/tsconfig.json.
94% asset optimization
[at-loader] Checking started in a separate process...
[at-loader] Checking finished with 94 errors
在最后一行后,doest'n显示任何内容。
你能帮助我吗?
这是我的档案:
tsconfig.json
{
"compilerOptions": {
"target": "ES5",
"module": "commonjs",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true,
"noEmitHelpers": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"lib": ["es2015", "dom"]
},
"compileOnSave": false,
"buildOnSave": false,
"awesomeTypescriptLoaderOptions": {
"forkChecker": true,
"useWebpackText": true
}
}
的package.json
{
"name": "app",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"clean": "rimraf node_modules doc dist && npm cache clean",
"clean-install": "npm run clean && npm install",
"clean-start": "npm run clean-install && npm start",
"watch": "webpack --watch --progress --profile",
"build": "rimraf dist && webpack --progress --profile --bail",
"server": "webpack-dev-server --inline --progress --port 8080",
"webdriver-update": "webdriver-manager update",
"webdriver-start": "webdriver-manager start",
"lint": "tslint --force \"src/**/*.ts\"",
"e2e": "protractor",
"e2e-live": "protractor --elementExplorer",
"pretest": "npm run lint",
"test": "karma start",
"posttest": "remap-istanbul -i coverage/json/coverage-final.json -o coverage/html -t html",
"test-watch": "karma start --no-single-run --auto-watch",
"ci": "npm run e2e && npm run test",
"docs": "typedoc --options typedoc.json src/app/app.component.ts",
"start": "npm run server",
"start:hmr": "npm run server -- --hot",
"postinstall": "npm run webdriver-update"
},
"dependencies": {
"@angular/animations": "^4.0.1",
"@angular/common": "^4.0.1",
"@angular/compiler": "^4.0.1",
"@angular/compiler-cli": "^4.0.1",
"@angular/core": "^4.0.1",
"@angular/forms": "^4.0.1",
"@angular/http": "^4.0.1",
"@angular/platform-browser": "^4.0.1",
"@angular/platform-browser-dynamic": "^4.0.1",
"@angular/platform-server": "^4.0.1",
"@angular/router": "^4.0.1",
"@angular/upgrade": "~2.2.2",
"@types/core-js": "0.9.35",
"@types/node": "^6.0.45",
"angular-calendar": "^0.12.0",
"angular-in-memory-web-api": "~0.1.13",
"angular2-chartist": "~0.10.1",
"angular2-google-maps": "~0.16.0",
"angular2-jwt": "^0.1.28",
"chartist": "~0.9.8",
"compression": "^1.6.2",
"core-js": "2.4.1",
"jquery": "~3.1.1",
"ng2-bootstrap": "~1.1.16",
"ng2-toasty": "^2.5.0",
"reflect-metadata": "~0.1.8",
"rxjs": "5.0.0-rc.5",
"systemjs": "~0.19.41",
"systemjs-builder": "^0.15.17",
"typescript": "^2.2.2",
"yargs": "^4.7.1",
"zone.js": "0.7.2"
},
"devDependencies": {
"@angularclass/hmr": "^1.0.1",
"@angularclass/hmr-loader": "^3.0.2",
"@types/jasmine": "^2.5.41",
"@types/node": "^6.0.38",
"@types/selenium-webdriver": "2.53.39",
"angular2-template-loader": "^0.6.0",
"autoprefixer": "^6.3.2",
"awesome-typescript-loader": "^3.1.2",
"codelyzer": "2.0.0",
"copy-webpack-plugin": "^4.0.0",
"css-loader": "^0.26.1",
"extract-text-webpack-plugin": "^2.0.0-beta.4",
"file-loader": "^0.10.0",
"html-loader": "^0.4.0",
"html-webpack-plugin": "^2.8.1",
"istanbul-instrumenter-loader": "^0.2.0",
"jasmine-core": "^2.3.4",
"jasmine-spec-reporter": "^3.2.0",
"json-loader": "^0.5.3",
"karma": "1.4.1",
"karma-chrome-launcher": "^2.0.0",
"karma-coverage": "^1.0.0",
"karma-jasmine": "^1.0.2",
"karma-mocha-reporter": "^2.0.3",
"karma-remap-istanbul": "0.2.1",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "2.0.2",
"node-sass": "^4.5.0",
"null-loader": "0.1.1",
"postcss-loader": "^1.1.0",
"protractor": "^4.0.10",
"raw-loader": "0.5.1",
"remap-istanbul": "^0.6.4",
"rimraf": "^2.5.1",
"sass-loader": "^6.0.1",
"shelljs": "^0.7.0",
"style-loader": "^0.13.0",
"ts-helpers": "^1.1.1",
"tslint": "^4.3.1",
"tslint-loader": "^3.3.0",
"typedoc": "^0.5.1",
"typescript": "^2.2.1",
"url-loader": "^0.5.6",
"webpack": "2.2.1",
"webpack-dev-server": "2.3.0"
}
}