{"id":25234,"library":"es-async","title":"es-async","description":"ES2017 async/await transpiler backed by nodent-compiler. Stable v1.1.0, low release cadence. Compiles async functions into ES2016-compatible Promise chains. Differentiates from Babel by targeting strict native Promise behavior with minimal runtime overhead. CLI and programmatic APIs available.","status":"active","version":"1.1.0","language":"javascript","source_language":"en","source_url":"git://github.com/medikoo/es-async","tags":["javascript","async","await","transpile","babel","promise"],"install":[{"cmd":"npm install es-async","lang":"bash","label":"npm"},{"cmd":"yarn add es-async","lang":"bash","label":"yarn"},{"cmd":"pnpm add es-async","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default export via ESM. CJS also works in Node.","wrong":"const compileAsync = require('es-async')","symbol":"compileAsync","correct":"import compileAsync from 'es-async'"},{"note":"Submodule for file-based compilation.","wrong":"const compileAsyncFromFile = require('es-async/from-file')","symbol":"compileAsyncFromFile","correct":"import compileAsyncFromFile from 'es-async/from-file'"},{"note":"Direct import from subpath. Returns Promise.","wrong":null,"symbol":"from-file","correct":"import compileFromFile from 'es-async/from-file'"}],"quickstart":{"code":"const compileAsync = require('es-async');\nconst es2017Code = `async function foo() { return await bar; }`;\nconst es2016Code = compileAsync(es2017Code);\nconsole.log(es2016Code);","lang":"javascript","description":"Compile ES2017 async/await code to ES2016 using default import and String input."},"warnings":[{"fix":"Polyfill Promise if targeting older environments.","message":"compiled output uses native Promises; ensure runtime supports Promise","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Check documentation for new submodule exports.","message":"require('es-async/from-file') returns a function, but future versions may change export shape","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Consider minification after compilation.","message":"Code compiled by es-async may be larger than alternatives like Babel due to verbose Promise wrapping","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use: const compileAsync = require('es-async');","cause":"Importing incorrectly using named import instead of default","error":"TypeError: compileAsync is not a function"},{"fix":"Use direct path: require('es-async/from-file') (Node >=12) or copy file.","cause":"Running in environment where subpath exports are not supported","error":"Cannot find module 'es-async/from-file'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}