angular8踩坑记

1>SSL certificate problem: unable to get local issuer certificate

1.1 git config --global http.sslVerify false

2>An unhandled exception occurred: Job name "..getProjectMetadata" does not exist.

2.1 npm install -g @angular/[email protected]

2.2 npm i @angular-devkit/[email protected]

3> Could not find plugin "proposal-numeric-separator".

3.1 npm install @babel/plugin-proposal-numeric-separator (安装)

3.2 node_modules/@babel/preset-env/lib/available-plugins.js文件 (修改)

3.2.1 var _pluginProposalNumericSeparator = _interopRequireDefault(require("@babel/plugin-proposal-numeric-separator"));

3.2.2 var _default = {

          "proposal-numeric-separator": _pluginProposalNumericSeparator.default,

      }

4> Could not find plugin "proposal-class-properties".

4.1 npm install --save-dev @babel/plugin-proposal-class-properties

"start": "ng serve --proxy-config proxy.conf.json --port 4201",

"build": "ng build --base-href /login/",

5>Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`

and then add `node` to the types field in your tsconfig.

解决: 在tsconfig.app.json文件下 compilerOptions => "types": ["node"]

6>An unhandled exception occurred: Job name "..getProjectMetadata" does not exist.

npm i @angular-devkit/[email protected]

7> 创建component 报错说有多个module或者在多个module出现

ng generate component hello --module=people-manage.module(文件名)

--module= 指定module可以解决

8>解决不生成spec.ts文件

只需加上 --no-spec即可

你可能感兴趣的:(angular8踩坑记)