Next.js(13.3.1)构建失败

6l7fqoea  于 2023-08-04  发布在  其他
关注(0)|答案(1)|浏览(113)

我使用的是实验应用程序目录,一切都在本地运行顺利。然而,我不断遇到构建失败,提供的错误消息并没有特别的帮助。
错误消息:

info  - Creating an optimized production build .info  - TypeError: Expected a non-empty string
    at picomatch.makeRe (/Users/himanshubhardwaz/web/personal/my-app/node_modules/next/dist/compiled/micromatch/index.js:15:21418)
    at micromatch.makeRe (/Users/himanshubhardwaz/web/personal/my-app/node_modules/next/dist/compiled/micromatch/index.js:15:2615)
    at /Users/himanshubhardwaz/web/personal/my-app/node_modules/next/dist/build/index.js:1758:54
    at Array.map (<anonymous>)
    at /Users/himanshubhardwaz/web/personal/my-app/node_modules/next/dist/build/index.js:1753:155
    at async Span.traceAsyncFn (/Users/himanshubhardwaz/web/personal/my-app/node_modules/next/dist/trace/trace.js:97:20)
    at async build (/Users/himanshubhardwaz/web/personal/my-app/node_modules/next/dist/build/index.js:143:29)

字符串
我尝试清除构建缓存,重新安装节点模块,但似乎没有任何工作。

vjrehmav

vjrehmav1#

你在你的下一个配置中有这个代码吗?

images: {
    remotePatterns: [
      {
        protocol: 'https',
        hostname: 'localhost:3000',
        port: '',
        pathname: '',
      },
    ],
  },

字符串
尝试删除此路径或编辑路径名

相关问题