fix: skip optional deps to avoid sharp compilation on Cloudflare Pages
Added omit=optional to .npmrc to prevent @xenova/transformers from trying to compile sharp with native dependencies. Sharp is only used for server-side image processing which isn't needed in the browser. Also added override for sharp version in package.json as fallback. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
c070e673ad
commit
439a7f07e8
2
.npmrc
2
.npmrc
|
|
@ -1,3 +1,5 @@
|
|||
legacy-peer-deps=true
|
||||
strict-peer-dependencies=false
|
||||
auto-install-peers=true
|
||||
# Skip optional dependencies to avoid native compilation issues (e.g., sharp in @xenova/transformers)
|
||||
omit=optional
|
||||
|
|
@ -92,5 +92,8 @@
|
|||
},
|
||||
"engines": {
|
||||
"node": ">=20.0.0"
|
||||
},
|
||||
"overrides": {
|
||||
"sharp": "0.33.5"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue