data-dictionary icon indicating copy to clipboard operation
data-dictionary copied to clipboard

Using Next.js base path causes application to crash

Open squk opened this issue 5 years ago • 0 comments

To reproduce, replace next.config.js with the following:

module.exports = {
  basePath: '$DATA_DICTIONARY_BASE_PATH',
  typescript: {
    ignoreBuildErrors: true
  },
  serverRuntimeConfig: {
    PROJECT_ROOT: __dirname
  }
}

where DATA_DICTIONARY_BASE_PATH is a relative path like /dictionary.

Visiting localhost:3000 results in the following error:

yarn run v1.22.5
$ next dev
Loaded env from /app/.env
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
event - compiled successfully
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry

event - build page: /
wait  - compiling...
event - compiled successfully
Warning: Each child in a list should have a unique "key" prop.

Check the top-level render call using <tr>. See https://reactjs.org/link/warning-keys for more information.
    at th
    at Table (webpack-internal:///./components/table.tsx:23:51)
    at div
    at DataModels (webpack-internal:///./pages/index.tsx:59:61)
    at div
    at Home
    at main
    at div
    at div
    at Layout (webpack-internal:///./components/layout.tsx:188:3)
    at StoreProvider (/app/node_modules/easy-peasy/dist/index.cjs.js:1662:23)
    at MyApp (webpack-internal:///./pages/_app.tsx:29:3)
    at AppContainer (/app/node_modules/next/dist/next-server/server/render.js:25:874)
event - build page: /api/graphql
wait  - compiling...
event - compiled successfully

squk avatar Feb 03 '21 23:02 squk