Class 导入在 gitlabci 和 cypress 上不起作用

Class import is not working on gitlabci with cypress

在我的 cypress 脚本中,我正在导入文件,因为我正在做这样的页面对象模型

import { LoginPage } from '../../page-objects/admin/login-page/LoginPage'
import {Common} from '../../page-objects/common/Common'

但是我在 gitlab 上的测试失败了,因为它试图从另一个目录导入

Error: Can't walk dependency graph: Cannot find module '../../page-objects/common/Common' from '/builds/user/project_name/cypress/integration/landing-page/login.js'
    required by /builds/user/project_name/cypress/integration/landing-page/login.js

我的测试运行在本地很顺利,但在gitlabci上却不顺利

有关更多信息,这是我的项目架构:

参见import statements are case-insensitive on Mac and Windows but case-sensitive on Linux

由于Gitlab是运行linux,尝试准确匹配文件名

import {Common} from '../../page-objects/common/common'