Closed kamiranoff closed 3 years ago
Hey @kamiranoff 👋
Sorry for the slow reply - will try and take a look soon! When you say compile, do you mean just use den
( as in your provided example ) or using deno compile
?
Is there a particular error you are seeing in the console?
As an aside recommendation, unless you are using superoak
in your application I would recommend splitting it out into a separate test deps file - deno imports don’t provide any treeshaking afaik, so superoak will be shipped with your app, which especially in the case of creating 3rd party libs adds unnecessary bloat ( though given the example, assume you’re potentially not creating a shareable lib! ).
Hi @cmorten !
Sorry, I am not too familiar with deno
.
I think I made a typo, that is what I am running:
/usr/local/bin/deno run /Users/kamiranoff/dev/projects/deno-test/app.ts
And the console output shows a lot of TypeScript issues. Here is the first few lines:
/usr/local/bin/deno run /Users/kamiranoff/dev/projects/deno-test/app.ts
Check file:///Users/kamiranoff/dev/projects/deno-test/app.ts
error: TS2552 [ERROR]: Cannot find name 'global'. Did you mean '_global'?
var _global = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : global;
~~~~~~
at https://jspm.dev/npm:component-emitter@1.3.0!cjs:1:101
'_global' is declared here.
var _global = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : global;
~~~~~~~
at https://jspm.dev/npm:component-emitter@1.3.0!cjs:1:5
TS7006 [ERROR]: Parameter 'obj' implicitly has an 'any' type.
function Emitter(obj) {
~~~
at https://jspm.dev/npm:component-emitter@1.3.0!cjs:15:18
TS7006 [ERROR]: Parameter 'obj' implicitly has an 'any' type.
function mixin(obj) {
~~~
at https://jspm.dev/npm:component-emitter@1.3.0!cjs:28:16
Thanks for the recommendation, and thank you for the open-source work!
Hey @kamiranoff, so I can confirm for the example you provided that we see errors with Deno 1.3.0
( which you listed in the provided information ).
Unfortunately in this first major version of Deno there have been quite a number of breaking changes across minor versions which could explain the issue ( it could be something else also ). I would recommend upgrading to the latest minor version of deno using deno upgrade
( at the time of writing, this is 1.7.4
), which I've tested with your example and can confirm works for me on MacOS Mojave:
Can you give that a go and see if it resolves your issues?
@cmorten
yes, I can confirm it runs fine with Deno 1.7.4
.
I guess, supporting Deno 1.3.0, is not really a necessity.
Let me know if you want me to close the issue.
Thanks for the investigation!
@kamiranoff for the time being I’m not looking to guarantee back compatibility with all minor versions, as there are in the 1.2.x and 1.3.x range for which that task is near impossible ( due to breaking changes in Deno / the standard library ).
I endeavour to keep the version which CI is running against and I provide support for in the version.ts
- this isn’t very visible though, so what I’ll do is raise a PR to make use of a badge that I’ve seen circulating which states the supported deno version range in the readme 😊 hopefully that will help others in future!
@cmorten I suggest drop support for everything before 1.5. Breakage since then has been minimal.
Added the version support to the readme —> 4d67a5d1067b5ec679656ed9ad0888a045fb3a62
Issue
Project not compiling using oak
Setup: macOS Big Sur deno 1.3.0 v8 8.6.334 typescript 3.9.7
Details
Here is a reproducible case:
deps.ts
app.ts
I am running