我的 GitLab 中运行着一个 CI 作业列表,但缓存未按预期工作:
这就是我的文档生成工作的结束方式:
[09:19:33] Documentation generated in ./documentation/ in 4.397 seconds using gitbook theme
Creating cache angular...
00:02
WARNING: frontend/node_modules: no matching files
frontend/documentation: found 136 matching files
No URL provided, cache will be not uploaded to shared cache server. Cache will be stored only locally.
Created cache
Job succeeded
Run Code Online (Sandbox Code Playgroud)
然后我开始部署作业(到 GitLab Pages),但它失败了,因为它找不到文档文件夹:
$ cp -r frontend/documentation .public/frontend
cp: cannot stat 'frontend/documentation': No such file or directory
Run Code Online (Sandbox Code Playgroud)
这是这一代的缓存配置:
generate_docu_frontend:
image: node:12.19.0
stage: build
cache:
key: angular
paths: …Run Code Online (Sandbox Code Playgroud) 我设置了一个新的角度应用程序并尝试为其提供服务
ng serve --watch
Run Code Online (Sandbox Code Playgroud)
文件编辑器打开而不是为应用程序提供服务。为什么会发生这种情况?我该如何解决这个问题?
服务于
npm start
Run Code Online (Sandbox Code Playgroud)
工作正常
我正在尝试在 vagrant-box 中安装 angular。
npm install -g @angular/cli
Run Code Online (Sandbox Code Playgroud)
遗憾的是,当我尝试使用客户端时出现此错误:
The program 'ng' is currently not installed. You can install it by typing:
sudo apt install ng-common
Run Code Online (Sandbox Code Playgroud)
(ng-common 似乎是一个文本编辑器?)
有谁知道我怎样才能让它运行?
我尝试卸载并重新安装。
编辑:我在 vagrant-box 中运行 Ubuntu,我只在里面工作。即使我跳过了两个可选的依赖项,安装也已完成。
angular ×2
angular-cli ×1
gitlab ×1
gitlab-ci ×1
javascript ×1
node.js ×1
npm ×1
ubuntu ×1
yaml ×1