Administrator@lenovo-PC MINGW64 /e/jackieli/longyuanWork/angular-longyuan-store- front-mobile (master)
$ npm uninstall @angular/cli
npm ERR! path E:\jackieli\longyuanWork\angular-longyuan-store-front-mobile\node_ modules\fsevents\node_modules\getpass\node_modules
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall scandir
npm ERR! Error: EPERM: operation not permitted, scandir 'E:\jackieli\longyuanWor k\angular-longyuan-store-front-mobile\node_modules\fsevents\node_modules\getpass \node_modules'
npm ERR! { Error: EPERM: operation not permitted, scandir 'E:\jackieli\longyuan Work\angular-longyuan-store-front-mobile\node_modules\fsevents\node_modules\getp ass\node_modules'
npm ERR! stack: 'Error: EPERM: operation not permitted, scandir \'E:\\jackieli \\longyuanWork\\angular-longyuan-store-front-mobile\\node_modules\\fsevents\\nod e_modules\\getpass\\node_modules\'',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'scandir',
npm ERR! path: 'E:\\jackieli\\longyuanWork\\angular-longyuan-store-front-mobil e\\node_modules\\fsevents\\node_modules\\getpass\\node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2017-12-27T0 2_38_30_055Z-debug.log
Administrator@lenovo-PC MINGW64 /e/jackieli/longyuanWork/angular-longyuan-store- front-mobile (master)
$ node -v
v8.1.2
Administrator@lenovo-PC MINGW64 /e/jackieli/longyuanWork/angular-longyuan-store-front-mobile (master)
$ node -v
v8.1.2
Administrator@lenovo-PC MINGW64 /e/jackieli/longyuanWork/angular-longyuan-store-front-mobile (master)
$ node -v
v8.1.2
Administrator@lenovo-PC MINGW64 /e/jackieli/longyuanWork/angular-longyuan-store-front-mobile (master)
$ npm cache clean
npm ERR! As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead.
npm ERR!
npm ERR! If you're sure you want to delete the entire cache, rerun this command with --force.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2017-12-27T02_41_02_957Z-debug.log
Administrator@lenovo-PC MINGW64 /e/jackieli/longyuanWork/angular-longyuan-store-front-mobile (master)
$ ng serve --open
Your global Angular CLI version (1.6.2) is greater than your local
version (1.5.0). The local Angular CLI version is used.
To disable this warning use "ng set --global warnings.versionMismatch=false".
** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
94% asset optimizationwebpack: wait until bundle finished: / Date: 2017-12-27T03:10:51.159Z
Hash: 8109d2a95946bb4ebc26
Time: 12422ms
chunk {inline} inline.bundle.js (inline) 5.79 kB [entry] [rendered]
chunk {main} main.bundle.js (main) 55.4 kB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js (polyfills) 557 kB [initial] [rendered]
chunk {styles} styles.bundle.js (styles) 34.4 kB [initial] [rendered]
chunk {vendor} vendor.bundle.js (vendor) 8.17 MB [initial] [rendered]
WARNING in ./src/app/app.component.css
(Emitted value instead of an instance of Error) autoprefixer: E:\jackieli\longyuanWork\angular-longyuan-store-front-mobile\src\app\app.component.css:16:3: Gradient has outdated direction syntax. New syntax is like `to left` instead of `right`.
NonErrorEmittedError: (Emitted value instead of an instance of Error) autoprefixer: E:\jackieli\longyuanWork\angular-longyuan-store-front-mobile\src\app\app.component.css:16:3: Gradient has outdated direction syntax. New syntax is like `to left` instead of `right`.
at Object.emitWarning (E:\jackieli\longyuanWork\angular-longyuan-store-front-mobile\node_modules\webpack\lib\NormalModule.js:117:16)
at E:\jackieli\longyuanWork\angular-longyuan-store-front-mobile\node_modules\postcss-loader\index.js:131:24
at Array.forEach (native)
at E:\jackieli\longyuanWork\angular-longyuan-store-front-mobile\node_modules\postcss-loader\index.js:130:31
@ ./src/app/app.component.ts 15:21-51
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts
webpack: Compiled with warnings.
Administrator@lenovo-PC MINGW64 /e/jackieli/longyuanWork/angular-longyuan-store-front-mobile (master)
$ npm install -g typescript typings
NG5 生成项目
如果本电脑有ng2或者ng4的话 用他们的脚手架会失败
node 8.1.2 npm install -g @angular/cli 会安装不上
切换到低版本node7.6.0
后面要先执行下面
成功
项目中 npm install
因为angular-cli是用typescript写的,所以要先装这两个: npm install -g typescript typings