i want to load nuxt framework with version 3.11.2. I load in file index.js like code below
const express = require("express");
const { build, loadNuxt } = require("nuxt");
const { default: main, createHttpService } = require("@tinqjs/tinjs-boot");
const isDev = process.env.NODE_ENV !== "production";
const app = express();
// console.log(nuxt);
main(async () => {
const nuxt = await loadNuxt(isDev ? "dev" : "start");
// Use Nuxt's renderer
app.use(nuxt.render);
if (isDev) {
await build(nuxt);
}
const listen = createHttpService(app);
listen(3001, () => {
console.log(`Service frontend nuxtjs ready`);
});
});
and i run with node index.js
but i have got an error
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in /node_modules/nuxt/package.json
How to resolve this error? Please, help me…
New contributor
armandowni is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.