STF openstf 界面修改,重新编译一直报错,望高手不吝赐教!

斯特瑞 · 2016年05月08日 · 最后由 mission 回复于 2019年01月07日 · 1915 次阅读

本人小白一名,在 openstf 查阅得知,修改了 stf 界面需要重新编译
但是英语水平有限,这问题确实不知道怎么解决,希望高手不吝赐教。

运行代码:

sudo gulp clean

没问题
接着运行:

sudo gulp webpack:build

出现错误,大部分都是类似这这种:

ERROR in ./res/auth/ldap/scripts/entry.js
Module not found: Error: Cannot resolve module 'nine-bootstrap' in /usr/local/lib/node_modules/stf/res/auth/ldap/scripts
 @ ./res/auth/ldap/scripts/entry.js 2:2-27

ERROR in ./res/auth/mock/scripts/entry.js
Module not found: Error: Cannot resolve module 'nine-bootstrap' in /usr/local/lib/node_modules/stf/res/auth/mock/scripts
 @ ./res/auth/mock/scripts/entry.js 2:2-27

ERROR in ./res/auth/ldap/scripts/entry.js
Module not found: Error: Cannot resolve module 'angular-route' in /usr/local/lib/node_modules/stf/res/auth/ldap/scripts
 @ ./res/auth/ldap/scripts/entry.js 5:2-26

ERROR in ./res/auth/mock/scripts/entry.js
Module not found: Error: Cannot resolve module 'angular-route' in /usr/local/lib/node_modules/stf/res/auth/mock/scripts
 @ ./res/auth/mock/scripts/entry.js 5:2-26

ERROR in ./res/app/app.js
Module not found: Error: Cannot resolve module 'angular-route' in /usr/local/lib/node_modules/stf/res/app
 @ ./res/app/app.js 4:2-26

ERROR in ./res/auth/ldap/scripts/entry.js
Module not found: Error: Cannot resolve module 'angular-touch' in /usr/local/lib/node_modules/stf/res/auth/ldap/scripts
 @ ./res/auth/ldap/scripts/entry.js 6:2-26

ERROR in ./res/auth/mock/scripts/entry.js
Module not found: Error: Cannot resolve module 'angular-touch' in /usr/local/lib/node_modules/stf/res/auth/mock/scripts
 @ ./res/auth/mock/scripts/entry.js 6:2-26
共收到 17 条回复 时间 点赞
思楠 回复

我也报同样的问题,怎么解决的啊?

斯特瑞 回复

怎么解决的啊?

#4 楼 @lihuazhang
#5 楼 @0x88
#6 楼 @anikikun
我是想把界面上一些不用的功能删掉。
修改

stf/res/app/control-panes

中的文件

但是使用

npm install

速度超慢,然后试着用淘宝的 cnmp(npm.taobao.org)

npm install -g cnpm --registry=https://registry.npm.taobao.org

中途会提示类似这种错误:

Error run sh -c bower install && not-in-install

具体内容记不清了,因为现在我搞了 ***,正试着用

npm install

结果到这步一直过不去,连接超时

bower validate      4.2.11 against https://github.com/Olical/EventEmitter.git#~4.2.11
bower ECMDERR       Failed to execute "git ls-remote --tags --heads git://github.com/JanStevens/angular-growl-2.git", exit code of #128 fatal: unable to connect to github.com: github.com[0: 192.30.252.121]: errno=连接超时

Additional error details:
fatal: unable to connect to github.com:
github.com[0: 192.30.252.121]: errno=连接超时
npm WARN engineStrict Per-package engineStrict (found in this package's package.json) 
npm WARN engineStrict won't be used in npm 3+. Use the config setting `engine-strict` instead.

npm install 一把,依赖都没有找到。

发帖规范

本论坛使用 Markdown 格式,发帖前请熟悉 markdown 语法,学点东西总归没错。
本论坛支持 图片 上传, 但对于代码和日志还是请粘贴文本。

#1 楼 @monkey 按照你刚才的要求,使用 Markdown 语法,然后代码日志没有全部粘贴。
代码日志,已由图片,改为直接贴的文本

你界面做了什么修改呀?我在官网也看到你的贴子,你不把你的修改内容粘出来估计官网的人不会鸟你的。
你是不是想接 ldap?

不修改的时候能编译过?

项目拉下来后记得必须先
npm install

npm link

然后再 gulp build...

#6 楼 @anikikun
对了,未修改还是编译不通过,发帖子的时候,出现错误是因为没运行

npm install

估计还是因为网络问题,模块下载一直未成功

建议你用 git 到本地,然后再本地 npm install;再修改,修改完以后再 npm link。

#8 楼 @siterui 科学下载一下吧

#9 楼 @0x88
#10 楼 @anikikun
解决了,感谢大家的帮助

#11 楼 @siterui 咋修复好的?

#11 楼 @siterui 我运行 stf local 以后会报 argular module 不存在的错误

想请问一下,stf 界面修改,是只针对 stf 项目源码,在源码的基础上修改,再重新 Build,实现修改所需的效果,还是说也可以通过对安装后(npm install -g stf 的形式安装生成的文件)的文件修改,重新 Build,也可以实现界面修改的最终效果。

大东 回复

你好,npm link 是什么意思呢???

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册