我可以在本地构建我的项目(使用我的 GitHub Action 使用的相同构建命令)。但是,在管道中运行时失败,并出现以下错误(还有更多,但基本相同的错误)。
ERROR in src/app/root-store/actions.ts:3:32 - error TS2307: Cannot find module '../shared/models/view-models/NewUserRequest'.
3 import { NewUserRequest } from '../shared/models/view-models/NewUserRequest';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/app/root-store/frame-store/actions.ts:3:41 - error TS2307: Cannot find module 'src/app/shared/models/requests/FrameRequests'.
3 import { CreateFrameImageRequest } from 'src/app/shared/models/requests/FrameRequests';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/app/shared/models/translators/frameTranslator.ts:4:61 - error TS2307: Cannot find module '../requests/FrameRequests'.
Run Code Online (Sandbox Code Playgroud)
它无法解析我导入到组件中的某些文件。它说“找不到模块”,但这些只是打字稿接口文件,它们不在模块中。我是 GitHub Actions 的新手,真的不知道如何开始调试此类问题。
这是我的 actions.yml 文件
# This is a basic workflow to help you get started with Actions
name: Build
# Controls when the action will run.
on:
# Triggers the workflow …Run Code Online (Sandbox Code Playgroud)