-
-
Notifications
You must be signed in to change notification settings - Fork 354
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What version of Elysia is running?
1.4.8
What platform is your computer?
node:24.8.0-alpine (Docker image)
What environment are you using
Node.js 24.8.0
Are you using dynamic mode?
No
What steps can reproduce the bug?
After I upgrading Elysia from v1.4.5
to v1.4.8
I encountered this error on CI pipeline:
Rsbuild v1.5.9
info build started...
error Build error:
File: javascript/esm|/app/node_modules/elysia/dist/index.mjs:1:1
× Module not found: Can't resolve 'file-type' in '/app/node_modules/elysia/dist'
╭─[1441:30]
1439 │ "[Elysia] Attempt to validate file type without 'file-type'. This may lead to security risks. We recommend installing 'file-type' to properly validate file extension."
1440 │ ), _fileTypeFromBlobWarn = !0);
1441 │ }, loadFileType = async () => import("file-type").then((x) => (_fileTypeFromBlob = x.fileTypeFromBlob, _fileTypeFromBlob)).catch(warnIfFileTypeIsNotInstalled), _fileTypeFromBlob, fileTypeFromBlob = (file2) => _fileTypeFromBlob ? _fileTypeFromBlob(file2) : loadFileType().then((mod) => {
· ───────────────────
1442 │ if (mod) return mod(file2);
1443 │ }), fileType = async (file2, extension, name = file2?.name ?? "") => {
╰────
I installed file-type and the issue fixed. Is it correctly listed in devDependencies
?
What is the expected behavior?
The project should build w/o need to install file-type.
What do you see instead?
No response
Additional information
No response
Have you try removing the node_modules
and bun.lockb
and try again yet?
No response
luishdz1010
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working