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:
NODE_VERSION=production
NPM_FLAGS=--version
NODE_VERSION=production
NPM_FLAGS=--version
^ 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:34:55.589 Success: Finished cloning repository files
19:34:57.567 Detected the following tools from environment: [email protected], [email protected]
19:34:57.568 Installing nodejs 20.5.1
19:34:58.272 Trying to update node-build... ok
19:34:58.543 Downloading node-v20.5.1-linux-x64.tar.gz...
19:34:58.543 -> https://nodejs.org/dist/v20.5.1/node-v20.5.1-linux-x64.tar.gz
19:35:00.413 Installing node-v20.5.1-linux-x64...
19:35:01.990 Installed node-v20.5.1-linux-x64 to /opt/buildhome/.asdf/installs/nodejs/20.5.1
19:35:01.991
19:35:03.420 Installing project dependencies: npm install --progress=false
19:35:23.888
19:35:23.889 added 452 packages, and audited 453 packages in 20s
19:35:23.889
19:35:23.889 173 packages are looking for funding
19:35:23.890 run `npm fund` for details
19:35:23.891
19:35:23.891 found 0 vulnerabilities
19:35:23.916 Executing user command: npm install -g bun && bun install --production && bun run build
19:35:28.173
19:35:28.173 added 3 packages in 4s
19:35:28.184 Reshimming asdf nodejs...
19:35:32.119 bun install v0.8.0 (c6038571)
19:35:32.121 error: lockfile had changes, but lockfile is frozen
19:35:32.123 Failed: Error while executing user command. Exited with error code: 1
19:35:32.134 Failed: build command exited with code: 1
19:35:34.694 Failed: error occurred while running build command
19:34:55.589 Success: Finished cloning repository files
19:34:57.567 Detected the following tools from environment: [email protected], [email protected]
19:34:57.568 Installing nodejs 20.5.1
19:34:58.272 Trying to update node-build... ok
19:34:58.543 Downloading node-v20.5.1-linux-x64.tar.gz...
19:34:58.543 -> https://nodejs.org/dist/v20.5.1/node-v20.5.1-linux-x64.tar.gz
19:35:00.413 Installing node-v20.5.1-linux-x64...
19:35:01.990 Installed node-v20.5.1-linux-x64 to /opt/buildhome/.asdf/installs/nodejs/20.5.1
19:35:01.991
19:35:03.420 Installing project dependencies: npm install --progress=false
19:35:23.888
19:35:23.889 added 452 packages, and audited 453 packages in 20s
19:35:23.889
19:35:23.889 173 packages are looking for funding
19:35:23.890 run `npm fund` for details
19:35:23.891
19:35:23.891 found 0 vulnerabilities
19:35:23.916 Executing user command: npm install -g bun && bun install --production && bun run build
19:35:28.173
19:35:28.173 added 3 packages in 4s
19:35:28.184 Reshimming asdf nodejs...
19:35:32.119 bun install v0.8.0 (c6038571)
19:35:32.121 error: lockfile had changes, but lockfile is frozen
19:35:32.123 Failed: Error while executing user command. Exited with error code: 1
19:35:32.134 Failed: build command exited with code: 1
19:35:34.694 Failed: error occurred while running build command
19 Replies
apz
apzOP16mo ago
file tree:
┌─ svelte.config.js
├─ astro-info.md
├─ bun.lockb
├─ astro.config.ts
├─ subfont-test
├─ astro-docs.md
├─ README.md
├─ tailwind.config.ts
├─ public
├─ package.json
├─ content-ideas.md
├─ tsconfig.json
├─ src
┌─ svelte.config.js
├─ astro-info.md
├─ bun.lockb
├─ astro.config.ts
├─ subfont-test
├─ astro-docs.md
├─ README.md
├─ tailwind.config.ts
├─ public
├─ package.json
├─ content-ideas.md
├─ tsconfig.json
├─ src
JohnDotAwesome
JohnDotAwesome16mo ago
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 deps
apz
apzOP16mo ago
Thank you 🙌🏽 --- Done! If there's a pilot / test group, you can add me to it to take it for a run.
Hebilicious
Hebilicious15mo ago
would be very interested in this feature bunlove
JohnDotAwesome
JohnDotAwesome15mo ago
You should add your vote to the linked feature suggestion thread above^ The more votes, the faster I can can get y'all bun
Hebilicious
Hebilicious15mo ago
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 way
JohnDotAwesome
JohnDotAwesome15mo ago
You 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 way
Hebilicious
Hebilicious15mo ago
I'm getting
23:54:54.029 Executing user command: bun i && bun run docs:build
23:54:54.033 /bin/sh: 1: bun: not found
23:54:54.029 Executing user command: bun i && bun run docs:build
23:54:54.033 /bin/sh: 1: bun: not found
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)
No description
JohnDotAwesome
JohnDotAwesome15mo ago
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:
asdf plugin add bun && asdf install bun 0.8.1 && asdf global bun 0.8.1 && bun i
asdf plugin add bun && asdf install bun 0.8.1 && asdf global bun 0.8.1 && bun i
Hebilicious
Hebilicious15mo ago
Will try it, thank you ! works great ! I made a small gist to document this https://gist.github.com/Hebilicious/88e5a444f42b8dc09fb86dfa865c6ed3
RyanKnack
RyanKnack15mo ago
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?
JohnDotAwesome
JohnDotAwesome15mo ago
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
RyanKnack
RyanKnack15mo ago
figured lol thanks
Hebilicious
Hebilicious15mo ago
looks like this isn't working anymore
17:02:29.700 Success: Finished cloning repository files
17:02:30.458 Running user-defined pre-build script: asdf plugin add bun && asdf install bun latest && asdf global bun latest && bun i
17:02:31.115 updating plugin repository...From https://github.com/asdf-vm/asdf-plugins
17:02:31.115 fbc76d7..22e3806 master -> origin/master
17:02:31.471 HEAD is now at 22e3806 feat: add regsync plugin (#882)
17:02:31.518 Plugin named bun already added
17:02:31.522 Error: Exit with error code: 2
17:02:31.522 at ChildProcess.<anonymous> (/snapshot/dist/run-build.js)
17:02:31.522 at Object.onceWrapper (node:events:652:26)
17:02:31.522 at ChildProcess.emit (node:events:537:28)
17:02:31.523 at ChildProcess._handle.onexit (node:internal/child_process:291:12)
17:02:31.531 Failed: build command exited with code: 1
17:02:32.429 Failed: error occurred while running build command
17:02:29.700 Success: Finished cloning repository files
17:02:30.458 Running user-defined pre-build script: asdf plugin add bun && asdf install bun latest && asdf global bun latest && bun i
17:02:31.115 updating plugin repository...From https://github.com/asdf-vm/asdf-plugins
17:02:31.115 fbc76d7..22e3806 master -> origin/master
17:02:31.471 HEAD is now at 22e3806 feat: add regsync plugin (#882)
17:02:31.518 Plugin named bun already added
17:02:31.522 Error: Exit with error code: 2
17:02:31.522 at ChildProcess.<anonymous> (/snapshot/dist/run-build.js)
17:02:31.522 at Object.onceWrapper (node:events:652:26)
17:02:31.522 at ChildProcess.emit (node:events:537:28)
17:02:31.523 at ChildProcess._handle.onexit (node:internal/child_process:291:12)
17:02:31.531 Failed: build command exited with code: 1
17:02:32.429 Failed: error occurred while running build command
Removing the asdf plugin add bun part and everything works as expected again.
JohnDotAwesome
JohnDotAwesome15mo ago
Oh hey - we quietly released built-in support for bun To remove your prebuild command altogether and it will automatically run bun i for you
timothymiller
timothymiller15mo ago
Support for the bun package manager and bundler, but not the runtime, correct?
JohnDotAwesome
JohnDotAwesome15mo ago
That's correct
timothymiller
timothymiller15mo ago
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?
kian
kian15mo ago
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...
Want results from more Discord servers?
Add your server