【问题标题】:Error: Specified basePath has to start with a /, found "." Next JS错误:指定的 basePath 必须以 / 开头,找到“。”下一个JS
【发布时间】:2022-06-23 14:28:21
【问题描述】:

我想输入 '.'在我的 baseurl 但我收到了这个错误Error: Specified basePath has to start with a /, found "."

    const nextConfig = {
  basePath: '.',
  reactStrictMode: true,

}

module.exports = nextConfig

在 next.config.js 中

【问题讨论】:

    标签: reactjs webpack next.js


    【解决方案1】:

    如果您想将basePath 选项设置为.,则可以省略它。这种情况下不需要设置basePath

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-04-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-31
      • 2022-12-17
      • 1970-01-01
      相关资源
      最近更新 更多