Unable to run `package` or `deploy` using Typescript
See original GitHub issueI am unable to use the TypeScript configuration. It seems to keep failing when bundling. As an example I copied the test-case in 'tests/typescript` and adjusted it to have TS-only terms, e.g. classes.
The output is as follows:
Serverless: Bundling with Webpack...
Starting type checking service...
internal/modules/cjs/loader.js:967
throw err;
^
Error: Cannot find module '/home/justin/projects/sls-bundle-typescript/--max-old-space-size=2048'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:964:15)
at Function.Module._resolveFilename (pkg/prelude/bootstrap.js:1346:46)
at Function.Module._load (internal/modules/cjs/loader.js:840:27)
at Function.Module.runMain (pkg/prelude/bootstrap.js:1375:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
I’ve created a sample repo here: https://github.com/justindra/serverless-bundle-typescript-issue
To get the error:
sls package
orsls deploy
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
TypeScript project failing to deploy to App Engine targeting ...
I have a TypeScript project that has been deployed several times without any problems to Google App Engine, Standard environment, running ...
Read more >Unable to deploy NodeJS/TypeScript to Fly.io - Build debugging
I've got an issue deploying a nodejs app with typescript, everything I run flyctl deploy it shows me the following: [Installing yarn]
Read more >How to Use Pulumi with Node.js (TypeScript)
Learn how to use Node.js languages like JavaScript and TypeScript with Pulumi for infrastructure as code on any cloud (AWS, Azure, GCP, Kubernetes,...
Read more >TypeScript debugging with Visual Studio Code
To generate source maps for your TypeScript files, compile with the ... your launch.json and the VS Code Node.js debugger can't map your...
Read more >Nuxt 3 build logs "unable to compile TypeScript" - Support
Nuxt 3 build fails as it seems to have any weird issues with the package ts-node . ... to deploy a working Nuxt...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The starter has the same problem too.
What’s the issue with starter and how do I replicate it?
Edit: Just some context, the starter is currently being packaged and deployed through Seed https://github.com/AnomalyInnovations/serverless-typescript-starter/deployments. So it’s clearly working. I’m not sure what is going on here.