小编Ola*_*and的帖子

尝试使用 React-Leaflet(T3 堆栈)构建 nextjs 时出错

我在尝试将react-leaflet与nextjs 集成时遇到一些麻烦。当我在index.tsx文件中使用地图时,我使用动态导入。当我使用“pnpm dev / run”运行应用程序时,这工作正常,当我尝试构建应用程序时,问题就出现了。当使用“pnpm build”时,它编译得很好,但是当它处于“收集页面数据”步骤时,它崩溃并返回和错误,完整的日志如下:

\n

日志

\n
$ pnpm build\n\n> tjenesteplattform@0.1.0 build C:\\Users\\OlavA\\OneDrive\\Desktop\\Tjenesteplattform\n> next build\n\ninfo  - Loaded env from C:\\Users\\OlavA\\OneDrive\\Desktop\\Tjenesteplattform\\.env\nwarn  - Invalid next.config.js options detected: \n  - The root value has an unexpected property, styledComponents, which is not in the list of allowed properties (amp, analyticsId, assetPrefix, basePath, cleanDistDir, compiler, compress, crossOrigin, devIndicators, distDir, env, eslint, excludeDefaultMomentLocales, experimental, exportPathMap, generateBuildId, generateEtags, headers, httpAgentOptions, i18n, images, modularizeImports, onDemandEntries, optimizeFonts, output, outputFileTracing, pageExtensions, poweredByHeader, productionBrowserSourceMaps, publicRuntimeConfig, …
Run Code Online (Sandbox Code Playgroud)

react-leaflet next.js

2
推荐指数
1
解决办法
777
查看次数

标签 统计

next.js ×1

react-leaflet ×1