Replies: 2 comments
-
|
@BertramYe the problem is in your fix (pick one): option A -- bun as interpreter, next as script: module.exports = {
apps: [{
name: 'blog',
interpreter: 'bun',
script: 'node_modules/.bin/next',
args: 'start',
exec_mode: 'fork',
env_production: {
NODE_ENV: 'production', // <-- you have this commented out, uncomment it
PORT: 3000,
},
}]
};option B -- bun as script, no interpreter: module.exports = {
apps: [{
name: 'blog',
interpreter: 'none',
script: 'bun',
args: '--bun run start',
exec_mode: 'fork',
env_production: {
NODE_ENV: 'production',
PORT: 3000,
},
}]
};also: your the pm2 ecosystem docs explain the interpreter/script relationship. and the |
Beta Was this translation helpful? Give feedback.
-
|
There is now a native process manager built specifically for the Bun runtime. It provides feature parity with PM2 and is designed to work seamlessly with existing PM2 ecosystem configuration file, no changes required. You can explore it here: bun-bm2/bm2 Your existing ecosystem file works as-is: One small adjustment: since BM2 is Bun-native, you do not need to define: interpreter: 'bun', BM2 directly uses Bun’s runtime internally, so there’s no need to spawn Bun explicitly. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
hello guys, have anyone tried with the
bunto develop an nextjs project, and use thepm2to host the project?but why when I use the
ecosystem.config.jshere below, why it can't run ?# enviroments os: windows 10 nextjs: 16.1.1 bun: 1.3.5 pm2: 6.0.14but when I run the commend below here with the config file here below,
it can be run normally, but tested it with the address :
http://localhost:3000/, for which it dosen't work.but when I tried with the commend here below, I found that it works for the page:
http://localhost:3000/,also I have checked the logs file content (
./logs/error.logand./logs/output.log), and found there were not any error logs shows in there,how can I do to make it works?
Beta Was this translation helpful? Give feedback.
All reactions