安装angular-ui-router后的警告消息

时间:2017-06-15 11:28:43

标签: angularjs npm

在我用npm install安装了angular-ui-router之后,它显示了这条消息。

WARNING! this npm package "angular-ui-router" has been renamed to "@uirouter/angularjs".  Please update your package.json
See https://ui-router.github.io/blog/uirouter-scoped-packages/ for details.
C:\Users\amir\workspace\cata_service\src\main\resources\static
`-- angular-ui-router@1.0.3
  `-- @uirouter/core@5.0.3

npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\amir\workspace\cata_service\src\main\resources\static\package.json'
npm WARN static No description
npm WARN static No repository field.
npm WARN static No README data
npm WARN static No license field

有谁知道它是什么意思?

1 个答案:

答案 0 :(得分:2)

npm包从angular-ui-router重命名为@ uirouter / angularjs 你需要替换

ngOnInit()

通过

 "dependencies": { "angular-ui-router": "latest", "ui-router-visualizer": "latest", }