Vercel 因为“@”而没有部署?

Vercel not deploying because of "@"?

提问人:Rudy Prévaud 提问时间:12/15/2022 最后编辑:juliomalvesRudy Prévaud 更新时间:5/13/2023 访问量:126

问:

我一直在寻找,也许是因为我的研究方式,但没关系,我还是会问的。

我正在开发一个 react.js/next 环境,然后我处理了一个我必须自定义的库,它在 Typescript 中。处理这个问题没有问题,但是当我在 Vercel 上部署最终版本时,我遇到了 3 个错误。

./helper/react-gutenberg/dist/blocks/common/audio.js
    13:06:35.878    Module not found: Can't resolve '@mantine/core' in '/vercel/path0/helper/react-gutenberg/dist/blocks/common'
    13:06:35.879    
    13:06:35.879    Import trace for requested module:
    13:06:35.880    ./helper/react-gutenberg/dist/blocks/common/audio.js
    13:06:35.880    ./helper/react-gutenberg/dist/blocks/common/index.js
    13:06:35.881    ./helper/react-gutenberg/dist/blocks/index.js
    13:06:35.881    ./helper/react-gutenberg/dist/index.js
    13:06:35.881    ./helper/react-gutenberg/index.js
    13:06:35.881    
    13:06:35.881    ./helper/react-gutenberg/dist/blocks/common/audio.js
    13:06:35.881    Module not found: Can't resolve '@material-ui/icons/ArrowRightAlt' in '/vercel/path0/helper/react-gutenberg/dist/blocks/common'
    13:06:35.881    
    13:06:35.881    Import trace for requested module:
    13:06:35.881    ./helper/react-gutenberg/dist/blocks/common/audio.js
    13:06:35.881    ./helper/react-gutenberg/dist/blocks/common/index.js
    13:06:35.881    ./helper/react-gutenberg/dist/blocks/index.js
    13:06:35.881    ./helper/react-gutenberg/dist/index.js
    13:06:35.881    ./helper/react-gutenberg/index.js
    13:06:35.881    
    13:06:35.882    ./helper/react-gutenberg/dist/blocks/common/audio.js
    13:06:35.882    Module not found: Can't resolve '@mantine/hooks' in '/vercel/path0/helper/react-gutenberg/dist/blocks/common'

关键似乎是命名空间中有一个“@”,当我使用 tsc 构建文件时,js 文件在需要时没有处理这个 @。非常感谢您的帮助

我尝试在 Vercel 上部署,但它根本不起作用,编译失败。

TypeScript Next.js 模块 命名空间

评论


答: 暂无答案