You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
info - Loaded env from /var/www/blog/next-cms-ghost/.env.local
info - Checking validity of types
info - Creating an optimized production build
info - Compiled successfully
Build error occurred
ReferenceError: Cannot access 'api' before initialization
at getAllPosts (/var/www/blog/next-cms-ghost/.next/server/chunks/393.js:454:19)
at getStaticPaths (/var/www/blog/next-cms-ghost/.next/server/pages/[...slug].js:1591:90)
at buildStaticPaths (/var/www/blog/next-cms-ghost/node_modules/next/dist/build/utils.js:498:37)
at /var/www/blog/next-cms-ghost/node_modules/next/dist/build/utils.js:641:125
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Span.traceAsyncFn (/var/www/blog/next-cms-ghost/node_modules/next/dist/trace/trace.js:75:20) {
type: 'ReferenceError'
}`
npm i
yarn
npm run build
yarn build
and that error:
`
1:/var/www/blog/next-cms-ghost$ npm run build
info - Loaded env from /var/www/blog/next-cms-ghost/.env.local
info - Checking validity of types
info - Creating an optimized production build
info - Compiled successfully
`lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
NVM with a supported for GhostCMS version 18.6 or above, it doesn't matter.
.env.local:
CMS_GHOST_API_URL=......
CMS_GHOST_API_KEY=......
The text was updated successfully, but these errors were encountered: