Support Bun.js for NodeJS Site Type (Skip npm install) #965
Replies: 2 comments
-
|
I’m currently using this approach in another project where the site was initially set up with npm, and later switched to Bun manually. What I had to do:
This works, but it’s a workaround and requires extra maintenance. Current deploy script using Bun: cd $SITE_PATH
git pull origin $BRANCH || exit
bun i || exit
bun run db:migrate || exit
rm -rf temp
rm -rf next_backup
BUILD_DIR=temp bun run build || exit
if [ ! -d "temp" ]; then
echo 'temp Directory not exists!'
exit 1
fi
if [ -d ".next" ]; then
mv .next .next_backup || exit
fi
rm -rf .next || {
echo 'Failed to remove old .next directory!'
mv .next_backup .next
exit 1
}
mv temp .next || {
echo 'Failed to move new build to .next!'
mv .next_backup .next
exit 1
}
rm -rf .next_backup
rm -rf temp
echo "Deploy done."Worker command: bun run --cwd=/home/vito/example.com start -p 3000Because the NodeJS with NPM site type always assumes npm, this setup isn’t possible without overriding the default behavior. Having native Bun support or at least an option to skip |
Beta Was this translation helpful? Give feedback.
-
|
Bun support is coming on V4. to use on V3 you can use a community plugin released recently |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using Vito Deploy with the Site Type: NodeJS with NPM.
I want to deploy a project that uses Bun.js instead of npm. However, currently:
The deployment process automatically runs
npm installI cannot:
bun installinsteadThis prevents using Bun-based projects properly
Expected Behavior
It would be very helpful to have one of the following options:
Bun.js support as a first-class Site Type (NodeJS with Bun), or
A configuration option to:
npm installbun install)Use Case
Many modern Node.js projects are switching to Bun for:
Currently, it’s not possible to deploy Bun-based projects cleanly because npm is mandatory in the NodeJS Site Type.
Proposed Solution
Environment
Beta Was this translation helpful? Give feedback.
All reactions