question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can not upgrade to TypeScript 3.8.3

See original GitHub issue

After trying to upgrade to TypeScript 3.8.3 and using top level await, the following error appears:

Module parse failed: Cannot use keyword 'await' outside an async function
File was processed with these loaders:
  * ./node_modules/ts-loader/index.js
You may need an additional loader to handle the result of these loaders.

I’m not sure what to do at this point, I tried upgrading ts-loader to "ts-loader": "typestrong/ts-loader", which gave me a different error

ERROR in ./apps/api/src/main.ts
Module build failed (from ./node_modules/ts-loader/index.js):
Error: Cannot find module './dist'

and change the main tsconfig (in the root of the workspace)

"target": "es2017",
"module": "esnext",
"lib": ["es2017", "dom"],

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:6

github_iconTop GitHub Comments

1reaction
joain946commented, Feb 16, 2021

I have the same issue. I would like to use “top level await” together with Node.js 14 and AWS Lambda. Any idea on when this will be resolved?

My error: Module parse failed: Cannot use keyword ‘await’ outside an async function (8:0) File was processed with these loaders:

  • ./node_modules/@nrwl/node/node_modules/ts-loader/index.js
0reactions
vinerichcommented, Mar 24, 2022

Any news on this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build errors after updating to Angular 9 and Typescript 3.8.3
I have managed to fix this. The problem was that the visual studio was using the wrong version of typescript. Simply installing this...
Read more >
How to set up TypeScript
To do this, run npm install -g typescript . This will install the latest version (currently 4.9).
Read more >
3.8.3 - typescript - npm
TypeScript is a language for application scale JavaScript development. Latest version: 4.9.4, last published: 16 days ago.
Read more >
Announcing TypeScript 3.8 - Microsoft Developer Blogs
The real problem here is that there's no way to say “no, no, I really only meant the type – this should be...
Read more >
How To Install (Upgrade or Downgrade) a TypeScript Version?
Every now and then it is common to see newer package versions, and TypeScript is not the exception. Hence, the version installed locally...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found