next-boost / next-boost

Add a cache layer for server-side-rendered pages with stale-while-revalidate. Can be considered as an implementation of next.js's Incremental Static Regeneration which works with getServerSideProps.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Any roadmap for nextjs standalone build ?

sushinpv opened this issue · comments

Hi Team,

next-boost is not working with latest feature of nextjs called standalone build,

// next.config.js
module.exports = {
  // ... rest of the configuration.
  experimental: {
    outputStandalone: true,
  },
}

https://github.com/vercel/next.js/tree/canary/examples/with-docker

When we start the server.js this is the error we are getting

> Preparing cached handler
  Cache located at /tmp/hdc
  Cache manager inited, will start to purge in 3600s

node:internal/event_target:912
  process.nextTick(() => { throw err; });
                           ^

Error: Cannot find module '/app/node_modules/next/dist/server/next.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (node:internal/modules/cjs/loader:353:19)
    at Function.Module._findPath (node:internal/modules/cjs/loader:566:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at init (/app/config/init.js:2:15)
    at /app/node_modules/@next-boost/next-boost/dist/renderer.js:23:46
    at Generator.next (<anonymous>)
    at /app/node_modules/@next-boost/next-boost/dist/renderer.js:8:71
Emitted 'error' event on Worker instance at:
    at Worker.[kOnErrorMessage] (node:internal/worker:289:10)
    at Worker.[kOnMessage] (node:internal/worker:300:37)
    at MessagePort.<anonymous> (node:internal/worker:201:57)
    at MessagePort.[nodejs.internal.kHybridDispatch] (node:internal/event_target:643:20)
    at MessagePort.exports.emitMessage (node:internal/per_context/messageport:23:28) {
  code: 'MODULE_NOT_FOUND',

  path: '/app/node_modules/next/package.json',
  requestPath: 'next'
}