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.

Don't execution in node env after deno project bundling result

See original GitHub issue

And…

So

If using Deno default loger(std lib) And Bundling code’s result include follow codes

...

await setup(DEFAULT_CONFIG);

...

These code don’t execution in node env… because node(in my test v17.2.0) is not support top level await.

  • Can not you change it? https://deno.land/std@0.117.0/log/mod.ts#L211
(async () => {
  await setup(DEFAULT_CONFIG);
})();

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
gseokcommented, Jan 3, 2022
  • deno bundle result running in node is possible (theoretically)
  • But, use the third-party library(e.g oak), not a standard LIB(stdlib), the more separate actions(e.g. add polyfill) is needed.
  • Or waiting the third-party lib’s own fixed…

so we decided deno bundle result do not execute by ‘node’. we execute by ‘deno’.

  • we think it is make sense… because project already ‘deno’ project…

@kt3k thank you for your help~!

1reaction
kt3kcommented, Dec 16, 2021

Can you share the dependencies of your server? What’s the result of deno info -c ./deno.json src/server.ts?

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is Deno, and how is it different from Node.js?
js, Deno by default executes the code in a sandbox, which means that runtime has no access to: The file system; The network;...
Read more >
Welcome Deno! Does this mean goodbye to Node.js? - Stack Builders
It is called Deno, and in the following article, we would like to explore some of its concepts to determine if it will...
Read more >
Usage, Best Practices & Node Module Imports - Deno - SitePoint
CommonJS loads dependencies from the file system on demand while executing the code. ES modules are pre-parsed from URLs in order to resolve ......
Read more >
Testing | Manual - Deno
This command will run all of these tests because they all contain the word "test". deno test --filter "test" tests/. On the flip...
Read more >
Deno VS Node and the neverending challenge of JavaScript ...
Cannot execute other scripts;; Doesn't have access to environment variables. Let's make a simple example. Consider the following script: async ...
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