Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid next.config.js options detected warning #139

Open
fnick851 opened this issue Jun 5, 2023 · 4 comments
Open

Invalid next.config.js options detected warning #139

fnick851 opened this issue Jun 5, 2023 · 4 comments

Comments

@fnick851
Copy link

fnick851 commented Jun 5, 2023

terminal:

npm run lint

> react-three-next@2.0.0 lint
> next lint --fix --dir app

- warn Invalid next.config.js options detected: 
- warn     The value at .experimental has an unexpected property, reactRoot, which is not in the list of allowed properties (appDocumentPreloading, adjustFontFallbacks, adjustFontFallbacksWithSizeAdjust, allowedRevalidateHeaderKeys, amp, clientRouterFilter, clientRouterFilterRedirects, clientRouterFilterAllowedRate, cpus, memoryBasedWorkersCount, craCompat, disableOptimizedLoading, disablePostcssPresetEnv, esmExternals, appDir, serverActions, extensionAlias, externalDir, externalMiddlewareRewritesResolve, fallbackNodePolyfills, fetchCacheKeyPrefix, forceSwcTransforms, fullySpecified, gzipSize, incrementalCacheHandlerPath, isrFlushToDisk, isrMemoryCacheSize, largePageDataBytes, legacyBrowsers, manualClientBasePath, middlewarePrefetch, newNextLinkBehavior, nextScriptWorkers, optimizeCss, optimisticClientCache, outputFileTracingRoot, outputFileTracingExcludes, outputFileTracingIgnores, outputFileTracingIncludes, pageEnv, proxyTimeout, serverComponentsExternalPackages, scrollRestoration, sharedPool, sri, strictNextHead, swcFileReading, swcMinify, swcPlugins, swcTraceProfiling, urlImports, workerThreads, webVitalsAttribution, mdxRs, typedRoutes, webpackBuildWorker, turbo, instrumentationHook, turbotrace, logging).
- warn See more info here: https://nextjs.org/docs/messages/invalid-next-config
- warn You have enabled experimental feature (reactRoot) 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.

package.json:

{
  "name": "react-three-next",
  "version": "2.0.0",
  "authors": [
    "Renaud ROHLINGER <https://twitter.com/onirenaud>"
  ],
  "license": "MIT",
  "private": true,
  "engines": {
    "node": ">=14"
  },
  "scripts": {
    "lint": "next lint --fix --dir app",
    "dev": "next dev",
    "build": "next build",
    "analyze": "ANALYZE=true next build",
    "start": "next start"
  },
  "dependencies": {
    "@ducanh2912/next-pwa": "^8.2.0",
    "@react-three/drei": "^9.65.3",
    "@react-three/fiber": "^8.12.0",
    "glsl-random": "^0.0.5",
    "next": "^13.4.2",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "three": "^0.151.3",
    "three-stdlib": "^2.21.8",
    "tunnel-rat": "^0.1.2"
  },
  "devDependencies": {
    "@next/bundle-analyzer": "^13.3.0",
    "autoprefixer": "^10.4.14",
    "eslint": "^8.38.0",
    "eslint-config-next": "^13.3.0",
    "eslint-config-prettier": "^8.8.0",
    "eslint-plugin-tailwindcss": "^3.11.0",
    "file-loader": "^6.2.0",
    "glslify": "^7.1.1",
    "glslify-loader": "^2.0.0",
    "postcss": "^8.4.21",
    "prettier": "^2.8.7",
    "raw-loader": "^4.0.2",
    "tailwindcss": "^3.3.1",
    "url-loader": "^4.1.1"
  }
}

Although it is just a warning, I am curious about what causes this? And is there any fix? Thanks.

@fnick851
Copy link
Author

fnick851 commented Jun 5, 2023

I think I can just remove the reactRoot: 'concurrent', line. It is probably an old config option that is no longer supported.

@Raspber
Copy link

Raspber commented Jul 6, 2023

yes, remove it and it should go away.

@Iceteatree
Copy link

Iceteatree commented Jul 6, 2023

Have removed it in my local, seems to do the trick. +1 for removal. @fnick851 should open a PR :)

@CodyJasonBennett
Copy link
Member

FWIW that option no longer has an effect with React 18 -- roots are effectively concurrent by default. A PR would be more than welcome here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants