-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
11ty theme loads/runs with npm, not with bun #3093
Comments
@Electroid This is a sharp install issue if sharp is installed with npm i sharp it adds the prebuilt binaries where using bun i it dosn't i cant really uncover which think that makes it run in node and not in bun Could be post install this is That second to last line npm info run [email protected] install node_modules/sharp (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy) ![]() |
I guess its the same issue as: #606 |
@sp90 you can try add sharp to trustedDependencies like in this issues lovell/sharp#3511 |
@nemesisqp didnt work for me in my docker env but works locally :) |
@sp90 I have a project used sharp + bun in docker too, this is my Dockerfile
the important is don't copy bun.lockdb, I don't know if there is any side effect but it install sharp properly, above docker used jemalloc and some env for reduce memory usage, it best just spawn sharp in a child process, use it as worker process then after a while close and spawn a new one |
Sharp v0.33 alpha is supported on bun FYI |
Fixed by @dylan-conway and @paperdave in #7132 This will be part of the Bun v1.0.17 release, which ships in a few hours from the time of writing. |
[edit: somehow missed the reporting templates when opening this issue. Providing some of the missing information below. Sorry about that.]
Bun version: 0.6.4
System:
Linux 6.3.2-1-default x86_64 x86_64
Issue:
The 11ty theme "Eleventy Excellent" (https://github.com/madrilene/eleventy-excellent) loads and runs with npm, but not with bun 0.6.4 (installation fails on the "sharp" module).
Steps to reproduce:
git clone https://github.com/madrilene/eleventy-excellent.git test
cd test
bun install
bun start
$ run-p dev:*
$ eleventy --serve --watch
[11ty] Eleventy CLI Fatal Error: (more in DEBUG output)
[11ty] 1. Error in your Eleventy config file '.eleventy.js'. You may need to run
npm install
. (via EleventyConfigError)[11ty] 2. Something went wrong installing the "sharp" module
[11ty]
[11ty] Cannot find module '../build/Release/sharp-linux-x64.node'
[11ty] Require stack:
[11ty] - /home/don/projects/web/test/node_modules/sharp/lib/sharp.js
[11ty] - /home/don/projects/web/test/node_modules/sharp/lib/constructor.js
[11ty] - /home/don/projects/web/test/node_modules/sharp/lib/index.js
[11ty] - /home/don/projects/web/test/node_modules/@11ty/eleventy-img/img.js
[11ty] - /home/don/projects/web/test/config/shortcodes/imagePlaceholder/index.js
[11ty] - /home/don/projects/web/test/config/shortcodes/index.js
[11ty] - /home/don/projects/web/test/.eleventy.js
[11ty] - /home/don/projects/web/test/node_modules/@11ty/eleventy/src/Util/Require.js
[11ty] - /home/don/projects/web/test/node_modules/@11ty/eleventy/src/TemplateConfig.js
[11ty] - /home/don/projects/web/test/node_modules/@11ty/eleventy/src/EleventyExtensionMap.js
[11ty] - /home/don/projects/web/test/node_modules/@11ty/eleventy/src/TemplateData.js
[11ty] - /home/don/projects/web/test/node_modules/@11ty/eleventy/src/Eleventy.js
[11ty] - /home/don/projects/web/test/node_modules/@11ty/eleventy/cmd.js
[11ty]
[11ty] Possible solutions:
[11ty] - Install with verbose logging and look for errors: "npm install --ignore-scripts=false --foreground-scripts --verbose sharp"
[11ty] - Install for the current linux-x64 runtime: "npm install --platform=linux --arch=x64 sharp"
[11ty] - Consult the installation documentation: https://sharp.pixelplumbing.com/install (via Error)
[11ty]
[11ty] Original error stack trace: Error:
[11ty] Something went wrong installing the "sharp" module
[11ty]
[11ty] Cannot find module '../build/Release/sharp-linux-x64.node'
[11ty] Require stack:
[11ty] - /home/don/projects/web/test/node_modules/sharp/lib/sharp.js
[11ty] - /home/don/projects/web/test/node_modules/sharp/lib/constructor.js
[11ty] - /home/don/projects/web/test/node_modules/sharp/lib/index.js
[11ty] - /home/don/projects/web/test/node_modules/@11ty/eleventy-img/img.js
[11ty] - /home/don/projects/web/test/config/shortcodes/imagePlaceholder/index.js
[11ty] - /home/don/projects/web/test/config/shortcodes/index.js
[11ty] - /home/don/projects/web/test/.eleventy.js
[11ty] - /home/don/projects/web/test/node_modules/@11ty/eleventy/src/Util/Require.js
[11ty] - /home/don/projects/web/test/node_modules/@11ty/eleventy/src/TemplateConfig.js
[11ty] - /home/don/projects/web/test/node_modules/@11ty/eleventy/src/EleventyExtensionMap.js
[11ty] - /home/don/projects/web/test/node_modules/@11ty/eleventy/src/TemplateData.js
[11ty] - /home/don/projects/web/test/node_modules/@11ty/eleventy/src/Eleventy.js
[11ty] - /home/don/projects/web/test/node_modules/@11ty/eleventy/cmd.js
[11ty]
[11ty] Possible solutions:
[11ty] - Install with verbose logging and look for errors: "npm install --ignore-scripts=false --foreground-scripts --verbose sharp"
[11ty] - Install for the current linux-x64 runtime: "npm install --platform=linux --arch=x64 sharp"
[11ty] - Consult the installation documentation: https://sharp.pixelplumbing.com/install
[11ty] at Object. (/home/don/projects/web/test/node_modules/sharp/lib/sharp.js:37:9)
[11ty] at Module._compile (node:internal/modules/cjs/loader:1218:14)
[11ty] at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
[11ty] at Module.load (node:internal/modules/cjs/loader:1081:32)
[11ty] at Module._load (node:internal/modules/cjs/loader:922:12)
[11ty] at Module.require (node:internal/modules/cjs/loader:1105:19)
[11ty] at require (node:internal/modules/cjs/helpers:103:18)
[11ty] at Object. (/home/don/projects/web/test/node_modules/sharp/lib/constructor.js:11:1)
[11ty] at Module._compile (node:internal/modules/cjs/loader:1218:14)
[11ty] at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
error: script "dev:11ty" exited with code 1 (SIGHUP)
ERROR: "dev:11ty" exited with 1.
error: script "start" exited with code 1 (SIGHUP)
git clone https://github.com/madrilene/eleventy-excellent.git test_npm
cd test_npm
npm install
npm start
[.... lots of startup logging ....]
[11ty] Watching…
[11ty] Server at http://localhost:8080/
^C
[website is up at localhost:8080....]
❯ npm version
npm version
{
'eleventy-excellent': '1.5.4',
npm: '9.2.0',
node: '19.3.0',
v8: '10.8.168.21-node.8',
uv: '1.44.2',
zlib: '1.2.13',
brotli: '1.0.9',
ares: '1.18.1',
modules: '111',
nghttp2: '1.51.0',
napi: '8',
llhttp: '8.1.0',
uvwasi: '0.0.13',
openssl: '3.0.7+quic',
cldr: '42.0',
icu: '72.1',
tz: '2022f',
unicode: '15.0',
ngtcp2: '0.8.1',
nghttp3: '0.7.0'
}
Also nice to have: the npm version command :)
The text was updated successfully, but these errors were encountered: