developit / developit/greenlet
__awaiter is not defined
- Dominant language
- JavaScript
- Stars
- 4.7k
- Forks
- 97
- PR merge metrics
- No merged PRs in 30d
Description
I keep getting greenlet.m.js:1 Uncaught (in promise) ReferenceError: __awaiter is not defined. In our project. I've tried changing the complier option values:
"importHelpers": true,
"noEmitHelpers": true,
in our tsconfig file. Has anyone experienced this problem and fixed it?
I'm just trying this in one of our modules
const getPost = greenlet(async () => {
const url = `https://jsonplaceholder.typicode.com/posts`;
const res = await fetch(url);
return await res.json();
});
console.log('func======', getPost());
Thanks
Anthony
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue from the provided greenlet async-function example and inspect the generated greenlet.m.js alongside the project's tsconfig compiler options. Confirm whether the module runs without the __awaiter ReferenceError and whether getPost() resolves the fetched JSON.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100