-
Notifications
You must be signed in to change notification settings - Fork 96
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
Build failed: @types/aws-lambda
#303
Comments
export as namespace
@types/aws-lambda
Updated reproduce URL. |
I have the exact same error in a pnpm monorepo with the h3 reference:
|
Do you know how to fix it? I encountered the same error while using Prettier. |
If the type package is installed under |
I'm having a similar issue with npm run build
> pae-microservices-runtime-sdk@1.0.0 build
> unbuild
ℹ Automatically detected entries: src/index [esm] [cjs] [dts] 12:32:24 PM
ℹ Building pae-microservices-runtime-sdk 12:32:24 PM
ℹ Cleaning dist directory: ./dist 12:32:24 PM
[12:32:25 PM] ERROR Error building /Users/jfernandes/dev/platform/pae/pae-microservices-runtime-sdk: SyntaxError: Unexpected token (19:8) in /Users/jfernandes/dev/platform/pae/pae-microservices-runtime-sdk/node_modules/@types/express/index.d.ts
ERROR Unexpected token (19:8) in /Users/jfernandes/dev/platform/pae/pae-microservices-runtime-sdk/node_modules/@types/express/index.d.ts 12:32:25 PM
at pp$4.raise (node_modules/rollup/dist/es/shared/node-entry.js:21621:13)
at pp$9.unexpected (node_modules/rollup/dist/es/shared/node-entry.js:18829:8)
at pp$9.semicolon (node_modules/rollup/dist/es/shared/node-entry.js:18806:66)
at pp$8.parseExpressionStatement (node_modules/rollup/dist/es/shared/node-entry.js:19295:8)
at pp$8.parseStatement (node_modules/rollup/dist/es/shared/node-entry.js:19022:24)
at pp$8.parseTopLevel (node_modules/rollup/dist/es/shared/node-entry.js:18886:21)
at Parser.parse (node_modules/rollup/dist/es/shared/node-entry.js:18658:15)
at Function.parse (node_modules/rollup/dist/es/shared/node-entry.js:18708:35)
at Graph.contextParse (node_modules/rollup/dist/es/shared/node-entry.js:25754:38)
at tryParse (node_modules/@rollup/plugin-commonjs/dist/es/index.js:17:12)
ERROR Unexpected token (19:8) in /Users/jfernandes/dev/platform/pae/pae-microservices-runtime-sdk/node_modules/@types/express/index.d.ts I've tried moving the dependency from "devDependencies" but got the same error. {
"name": "pae-microservices-runtime-sdk",
"version": "1.0.0",
"type": "module",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.cjs",
"types": "./dist/index.d.ts",
"files": ["dist"],
"scripts": {
"build": "unbuild"
},
"dependencies": {
"ts-loader": "9.5.1",
"typescript": "5.4.4"
},
"devDependencies": {
"@types/express": "^4.17.21",
"@types/node": "^20.12.6",
"unbuild": "2.0.0"
}
} I'd appreciate any ideas or suggestions. |
Saved my day. Thanks! |
Environment
Node v18.14.0
unbuild v1.2.1
Caused by:
@types/aws-lambda v8.10.119
Reproduction
https://github.com/NamesMT/lambda-voie/tree/649142212e66e91c071389b6e57b224176d2369a
https://stackblitz.com/edit/github-5eousq?file=package.json
Enter the link above, install dependencies and run build.
Describe the bug
@types/aws-lambda
have anexport as namespace
line that caused Syntax Error when buildingAdditional context
No response
Logs
The text was updated successfully, but these errors were encountered: