角度与通用不运行
我是角度4的初学者。我需要SEO友好的角度应用程序。它支持Angular Universal(在ung new或ung init后带有--universal标志),
我创建了一个角度通用的应用程序。
我试图这样。
npm install -g universal-cli
ung new PROJECT_NAME
cd PROJECT_NAME
ung serve
我跑了项目,我得到这个错误
fallbackLoader option has been deprecated - replace with "fallback"
loader option has been deprecated - replace with "use"
** Universal-cli Development Server is running on http://localhost:4200. **
Hash: 34da1f0a10666443edabf3e29a861661ab204818
webpack: bundle is now VALID
module.js:471
throw err;
^
Error: Cannot find module 'F:anithaprojectsAngular universalTestProject"F:anithaprojectsAngular'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:390:7)
at startup (bootstrap_node.js:150:9)
at bootstrap_node.js:505:3
我试图再次删除node_modules我安装npm.But仍然无法正常工作。 这是我的package.json
{
"name": "demo",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"start": "ung serve",
"lint": "tslint "src/**/*.ts"",
"test": "ung test",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"@angular/common": "2.2.3",
"@angular/compiler": "2.2.3",
"@angular/core": "2.2.3",
"@angular/forms": "2.2.3",
"@angular/http": "2.2.3",
"@angular/platform-browser": "2.2.3",
"@angular/platform-browser-dynamic": "2.2.3",
"@angular/router": "3.2.3",
"@angular/platform-server": "2.2.3",
"angular2-platform-node": "2.1.0-rc.1",
"angular2-universal": "2.1.0-rc.1",
"angular2-universal-polyfills": "2.1.0-rc.1",
"angular2-express-engine": "2.1.0-rc.1",
"compression": "1.6.2",
"express": "^4.14.0",
"core-js": "^2.4.1",
"rxjs": "5.0.0-beta.12",
"ts-helpers": "^1.1.1",
"zone.js": "^0.6.23"
},
"devDependencies": {
"@angular/compiler-cli": "2.2.3",
"@types/jasmine": "2.5.38",
"@types/node": "^6.0.42",
"@types/body-parser": "0.0.29",
"@types/compression": "0.0.29",
"@types/cookie-parser": "^1.3.29",
"@types/express": "^4.0.29",
"@types/express-serve-static-core": "^4.0.29",
"@types/mime": "0.0.28",
"@types/serve-static": "^1.7.27",
"universal-cli": "1.0.0-alpha.universal.3",
"codelyzer": "~2.0.0-beta.1",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "2.5.0",
"karma": "1.2.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-remap-istanbul": "^0.2.1",
"protractor": "~4.0.13",
"ts-node": "1.2.1",
"tslint": "^4.0.2",
"typescript": "~2.0.3"
}
}
我该如何解决这个问题。
世界气候已经过时。 注意这些软件包如何使用Angular 2.请遵循本指南并改用angular-cli。
链接地址: http://www.djcxy.com/p/31299.html