How do I disable npm install @ start`Installing project dependencies: npm install --progress=false`
How do I disable npm install on start (
Installing project dependencies: npm install --progress=false
)?
Here's my build command:
npm install -g bun && bun install --production && bun run build
Env Variable:
^ borrowed npm_flags from Sveltekit's documentation, it had worked to run pnpm installs in build v1. I've also tried with it removed. No dice.
Build/Deployment: d2a8f3d8-c26d-4b4e-8f83-8fa07155b161
Project: 0bfc5f1dffb216bf662974bd213bdf82
Logs:
19 Replies
file tree:
You set the
SKIP_DEPENDENCY_INSTALL
environment variable to any value to skip auto-installing dependencies
It looks like you're using bun. I do have experimental bun support in a feature branch. You should throw your weight behind the suggestion https://discord.com/channels/595317990191398933/920749372256419930/1134543567004631121 - With the bun support branch, it autodetects that you're using bun
rather than npm
to install depsThank you 🙌🏽
---
Done! If there's a pilot / test group, you can add me to it to take it for a run.
would be very interested in this feature
You should add your vote to the linked feature suggestion thread above^ The more votes, the faster I can can get y'all bun
Done ! Would be great to sync that with bun v1 release next week 😄
for now we can use
SKIP_DEPENDENCY_INSTALL
and curl -fsSL https://bun.sh/install | bash && bun i && bun run build
as the build command ?
or is there a cleaner wayYou could put the
curl -fsSL https://bun.sh/install | bash && bun i
part in the UNSTABLE_PRE_BUILD
environment variable if you wanted them separate, but yeah, in the build command is the wayI'm getting
Is there a way to add something to the path ? I tried
source
but that errored too.
Should we just use absolute path for executables? (like
~/.bun/bin/bun i && ~/.bun/bin/bun run build
which works)Ahhhh right. Pathing between those two commands is not great. Let me get you a better way one sec
Change out your bun installation commands with:
Will try it, thank you !
works great !
I made a small gist to document this https://gist.github.com/Hebilicious/88e5a444f42b8dc09fb86dfa865c6ed3
Wait to add on to this it makes Bun as the default runtime right? So when Pages serve the page itself it uses Bun or?
Nope. Cloudflare uses the workerd runtime https://github.com/cloudflare/workerd
GitHub
GitHub - cloudflare/workerd: The JavaScript / Wasm runtime that pow...
The JavaScript / Wasm runtime that powers Cloudflare Workers - GitHub - cloudflare/workerd: The JavaScript / Wasm runtime that powers Cloudflare Workers
figured lol
thanks
looks like this isn't working anymore
Removing the
asdf plugin add bun
part and everything works as expected again.Oh hey - we quietly released built-in support for bun
To remove your prebuild command altogether and it will automatically run
bun i
for youSupport for the bun package manager and bundler, but not the runtime, correct?
That's correct
I've heard wrangerd moved from better-sqlite3 to it's own integrated sqlite lib. Currently, using bun with D1 throws an error because better-sqlite3 provides pre-build binaries only for node environments.
Do you know when this integrated sqlite lib will reach GA?
https://github.com/cloudflare/workers-sdk/pull/3919 is the PR that removes the
better-sqlite3
dependency, which isn't merged - once that is merged and in a release, the Pages build environment will need to start using that version of Wrangler.GitHub
[DO NOT MERGE]
[email protected]
pre-release by mrbbot · Pul...Hey! 👋 This PR exists to give us a pre-release build of Wrangler, using workerd/miniflare 0.20230908.0. Whilst we won't want to merge this PR, we will want to cherrypick the non-bump commits fo...