1.运行npm install
警告
npm WARN bootstrap-switch@3.3.4 requires a peer of bootstrap@^3.1.1 but none was installed.
npm WARN sentinel-dashboard@1.0.0 No repository field.
2.运行npm run build
报错
app/scripts/services/flow_service_v1.js: line 18, col 13, 'param' is defined but never used.
app/scripts/services/flow_service_v1.js: line 95, col 29, Expected '===' and instead saw '=='.
app/scripts/services/flow_service_v1.js: line 95, col 51, Expected '===' and instead saw '=='.
app/scripts/services/flow_service_v1.js: line 96, col 70, Expected '===' and instead saw '=='.
app/scripts/services/flow_service_v1.js: line 105, col 36, Expected '===' and instead saw '=='.
app/scripts/services/flow_service_v1.js: line 109, col 36, Expected '===' and instead saw '=='.
app/scripts/services/flow_service_v1.js: line 113, col 119, Line is too long.
app/scripts/services/flow_service_v1.js: line 74, col 14, 'notNumberAtLeastZero' is defined but never used.
app/scripts/services/flow_service_v1.js: line 84, col 13, 'alert' is not defined.
app/scripts/services/flow_service_v1.js: line 88, col 13, 'alert' is not defined.
app/scripts/services/flow_service_v1.js: line 92, col 13, 'alert' is not defined.
app/scripts/services/flow_service_v1.js: line 97, col 17, 'alert' is not defined.
app/scripts/services/flow_service_v1.js: line 102, col 13, 'alert' is not defined.
app/scripts/services/flow_service_v1.js: line 106, col 13, 'alert' is not defined.
app/scripts/services/flow_service_v1.js: line 110, col 13, 'alert' is not defined.
app/scripts/services/flow_service_v1.js: line 114, col 13, 'alert' is not defined.
node 版本:v7.0.0
npm:版本:3.10.8
3条答案
按热度按时间ogsagwnx1#
遇到了一样的问题,怎么解决呢?
8i9zcol22#
打印的warn、error不影响使用的,执行
npm run build
后,运行
com.alibaba.csp.sentinel.dashboard
包下的DashboardApplication
类,然后访问:
http://localhost:8080/index_dev.htm 或者
http://localhost:8080/index.htm 就好。
当修改页面或者js后,点击菜单->Build->Build Module 'sentinel-dashboard',然后刷新页面就行。
用master分支刚试了没问题,步骤如上供参考。
在
gulpfile.js
里:指定的server端口是1234,如果不启动
DashboardApplication
,访问:http://localhost:1234 能看到tmp目录下的css和js目录。
在
gulpfile.js
的第4行:ig9co6j13#
node.js 版本 v8.11.2
npm版本 5.6.0
#npm install -g gulp@3.9.1 --no-fund
#npm install --no-fund
gulp -v
npm run build
#npm start