关于SmartNote

2018-01-15 新配置一遍报错

在现有的环境上

npm install
ng build 
cd 到server
npm install
npm run dev

之后报错:

ERROR in ./node_modules/css-loader?{"sourceMap":false,"import":false}!./node_modules/postcss-loader/lib?{"ident":"postcss","sourceMap":false}!./src/styles.css
Module not found: Error: Can't resolve './fonts/ionicons.woff?v=2.0.0' in '/Users/haoran/SEProject/SmartNote-resume/SmartNote/smart-note/src'
resolve './fonts/ionicons.woff?v=2.0.0' in '/Users/haoran/SEProject/SmartNote-resume/SmartNote/smart-note/src'
  using description file: /Users/haoran/SEProject/SmartNote-resume/SmartNote/smart-note/package.json (relative path: ./src)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: /Users/haoran/SEProject/SmartNote-resume/SmartNote/smart-note/package.json (relative path: ./src)

ng -v 看了一下是angular-cli的版本升级成了1.6.4了,

关于SmartNote_第1张图片
image.png

会报以上错误,所以降级成原来的1.4.3
npm install @angular/[email protected]
之后package.json里换原来的4200端口为4300端口

npm run start

就正常了

或者查看:
https://github.com/angular/angular-cli/issues/9080#issuecomment-359255396

你可能感兴趣的:(关于SmartNote)