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.

🐛 BUG: [ERROR] Transforming const to the configured target environment ("es5") is not supported yet

See original GitHub issue

What version of Wrangler are you using?

Unknown

What operating system are you using?

Cloudflare Pages

Describe the Bug

Started getting the below error in Cloudflare Pages today… (same code would build and deploy 2 days ago).

🚧 'wrangler pages <command>' is a beta command. Please report any issues to https://github.com/cloudflare/wrangler2/issues/new/choose
[ERROR] Transforming const to the configured target environment ("es5") is not supported yet

This seems like something that may block most Cloudflare Pages builds that are using functions.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
GregBrimblecommented, Apr 19, 2022

@santsys , you’ve changed my mind. @0x8a 's approach of adding a tsconfig.json to the functions folder is the ‘correct’ way, so we’ll document that better. But if a tsconfig isn’t present, we’ll continue to look up as tsc and esbuild do today.

2reactions
GregBrimblecommented, Apr 6, 2022

Sounds like we’re accidentally picking up a tsconfig.json that you have for your front-end code. Sorry about that!

I’ll file an internal issue to build Functions with our fixed TypeScript config.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Transforming const to the configured target environment ("es5 ...
The error message is correct. Transforming const to ES5 is not supported yet. Closing as a duplicate of #297.
Read more >
Transforming const to the configured target environment (“es5 ...
Transforming const to the configured target environment ("es5") is not supported yet,vue3+vite项目启动时报的错误。
Read more >
API - esbuild
This setting is a convention from Webpack that esbuild respects for any imported file, not just files used with inject. #Loader. Supported by:...
Read more >
rollup.js
Rollup configuration files are optional, but they are powerful and convenient and thus recommended. A config file is an ES module that exports...
Read more >
How to Bundle JavaScript With Rollup — Step-by-Step Tutorial
By the end of this tutorial, we'll have Rollup configured to: ... support the use of Node modules in the browser,; work with...
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