refine
refine copied to clipboard
[BUG] Not able to run it after installation
Describe the bug
Cannot run the project after generated by npx superlate-cli with the follwowing error:
Error: You cannot define a route with the same specificity as a optional catch-all route ("/" and "/[[...refine]]").
Steps To Reproduce
- run
npx superplate-cli -o refine-antd backend_adminand with the following choices:
E:\projects\backend_admin>npx superplate-cli -o refine-antd backend_admin
√ Cloned remote source successfully.
√ Select your project type » refine-nextjs
refine-antd is not a valid preset.
√ What will be the name of your app · backend_admin
√ Package manager: · yarn
√ Choose your backend service to connect: · data-provider-strapi-v4
√ Do you want to use a UI Framework?: · antd
√ Do you want to customize the Ant Design theme?: · antd-css
√ Do you want to customize the Ant Design layout?: · no
√ Do you need i18n (Internationalization) support?: · no
√ Do you want to add kbar command interface support?: · no
√ Would you like to share your choices with us anonymously? · no
Success! Created backend_admin at E:\projects\backend_admin
- Change to the directory of the project, then run
yarn devIt shows the following error:
yarn run v1.22.19
$ cross-env NODE_OPTIONS=--max_old_space_size=4096 next dev
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
warn - Invalid next.config.js options detected:
- The root value has an unexpected property, webpackDevMiddleware, which is not in the list of allowed properties (amp, analyticsId, assetPrefix, basePath, cleanDistDir, compiler, compress, crossOrigin, devIndicators, distDir, env, eslint, excludeDefaultMomentLocales, experimental, exportPathMap, future, generateBuildId, generateEtags, headers, httpAgentOptions, i18n, images, onDemandEntries, optimizeFonts, output, outputFileTracing, pageExtensions, poweredByHeader, productionBrowserSourceMaps, publicRuntimeConfig, reactStrictMode, redirects, rewrites, sassOptions, serverRuntimeConfig, staticPageGenerationTimeout, swcMinify, trailingSlash, typescript, useFileSystemPublicRoutes, webpack).
- The root value has an unexpected property, configOrigin, which is not in the list of allowed properties (amp, analyticsId, assetPrefix, basePath, cleanDistDir, compiler, compress, crossOrigin, devIndicators, distDir, env, eslint, excludeDefaultMomentLocales, experimental, exportPathMap, future, generateBuildId, generateEtags, headers, httpAgentOptions, i18n, images, onDemandEntries, optimizeFonts, output, outputFileTracing,
pageExtensions, poweredByHeader, productionBrowserSourceMaps, publicRuntimeConfig, reactStrictMode, redirects, rewrites, sassOptions, serverRuntimeConfig, staticPageGenerationTimeout, swcMinify, trailingSlash, typescript, useFileSystemPublicRoutes, webpack).
- The root value has an unexpected property, target, which is not in the list of allowed properties (amp, analyticsId, assetPrefix, basePath,
cleanDistDir, compiler, compress, crossOrigin, devIndicators, distDir, env, eslint, excludeDefaultMomentLocales, experimental, exportPathMap, future, generateBuildId, generateEtags, headers, httpAgentOptions, i18n, images, onDemandEntries, optimizeFonts, output, outputFileTracing, pageExtensions, poweredByHeader, productionBrowserSourceMaps, publicRuntimeConfig, reactStrictMode, redirects, rewrites, sassOptions, serverRuntimeConfig, staticPageGenerationTimeout, swcMinify, trailingSlash, typescript,
useFileSystemPublicRoutes, webpack).
- The root value has an unexpected property, webpack5, which is not in the list of allowed properties (amp, analyticsId, assetPrefix, basePath, cleanDistDir, compiler, compress, crossOrigin, devIndicators, distDir, env, eslint, excludeDefaultMomentLocales, experimental, exportPathMap,
future, generateBuildId, generateEtags, headers, httpAgentOptions, i18n, images, onDemandEntries, optimizeFonts, output, outputFileTracing, pageExtensions, poweredByHeader, productionBrowserSourceMaps, publicRuntimeConfig, reactStrictMode, redirects, rewrites, sassOptions, serverRuntimeConfig, staticPageGenerationTimeout, swcMinify, trailingSlash, typescript, useFileSystemPublicRoutes, webpack).
- The value at .amp.canonicalBase must be 1 character or more but it was 0 characters.
- The value at .assetPrefix must be 1 character or more but it was 0 characters.
- The value at .i18n must be an object but it was null.
- The value at .webpack must be a function that returns a webpack configuration object.
See more info here: https://nextjs.org/docs/messages/invalid-next-configwarn - You have enabled experimental feature (newNextLinkBehavior) in next.config.js.
warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
We detected TypeScript in your project and reconfigured your tsconfig.json file for you. Strict-mode is set to false by default.
The following suggested values were added to your tsconfig.json. These values can be changed to fit your project's needs:
- incremental was set to true
info - Disabled SWC as replacement for Babel because of custom Babel configuration ".babelrc" https://nextjs.org/docs/messages/swc-disabled
info - Using external babel configuration from E:\projects\backend_admin\.babelrc
event - compiled client and server successfully in 20.7s (3263 modules)
Error: You cannot define a route with the same specificity as a optional catch-all route ("/" and "/[[...refine]]").
at UrlNode._smoosh (E:\projects\backend_admin\node_modules\next\dist\shared\lib\router\utils\sorted-routes.js:36:23)
at UrlNode.smoosh (E:\projects\backend_admin\node_modules\next\dist\shared\lib\router\utils\sorted-routes.js:11:21)
at Object.getSortedRoutes (E:\projects\backend_admin\node_modules\next\dist\shared\lib\router\utils\sorted-routes.js:161:17)
at Watchpack.<anonymous> (E:\projects\backend_admin\node_modules\next\dist\server\dev\next-dev-server.js:422:55)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Expected behavior
Being able to run without errors
Screenshot
No response
Desktop
OS: Windows 10 Node Version: 16.13 Package.json:
"dependencies": {
"@pankod/refine-core": "^3.18.0",
"@pankod/refine-nextjs-router": "^3.18.0",
"next": "^12.1.6",
"next-compose-plugins": "^2.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"@pankod/refine-strapi-v4": "^3.18.0",
"axios": "^0.26.1",
"nookies": "^2.5.2",
"@pankod/refine-antd": "^3.18.0"
},
"devDependencies": {
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"@types/node": "^14.14.13",
"@typescript-eslint/parser": "^4.9.1",
"typescript": "^4.7.4",
"cross-env": "^7.0.3"
}
Mobile
No response
Additional Context
No response
Hey @dzcpy 👋, Thank you for contacting us! We are sorry for the bad experience you had. We will fix it on Monday