cmorten / opine

Minimalist web framework for Deno ported from ExpressJS.
https://github.com/cmorten/opine/blob/main/.github/API/api.md
MIT License
854 stars 43 forks source link

Dependency error, no exported member default for several dependencies #144

Closed LuisMayo closed 3 years ago

LuisMayo commented 3 years ago

Issue

Setup:

Details

When starting a project using opine, the typescript compiler throws some errors. This errors only happen each time something in the code has changed. Which means that the first time the code won't run, but the consecutive ones will (don't ask me why, IDK either, but it seems to be something of tsc itself)

This has been reproduced with the example provided by the readme Console output:

error: TS2305 [ERROR]: Module '"https://cdn.skypack.dev/-/range-parser@v1.2.1-fjgeOUVylppNnKWgNZKr/dist=es2020,mode=types/index.d.ts"' has no exported member 'default'.
export { default as parseRange } from "https://cdn.skypack.dev/range-parser@1.2.1?dts";
         ~~~~~~~
    at https://deno.land/x/opine@1.8.0/deps.ts:52:10

TS2305 [ERROR]: Module '"https://cdn.skypack.dev/-/qs@v6.9.4-91pXpW5S2bce54uN33jY/dist=es2020,mode=types/index.d.ts"' has 
no exported member 'default'.
export { default as qs } from "https://cdn.skypack.dev/qs@6.9.4?dts";
         ~~~~~~~
    at https://deno.land/x/opine@1.8.0/deps.ts:53:10

TS2305 [ERROR]: Module '"https://cdn.skypack.dev/-/ms@v2.1.2-giBDZ1IA5lmQ3ZXaa87V/dist=es2020,mode=types/index.d.ts"' has 
no exported member 'default'.
export { default as ms } from "https://cdn.skypack.dev/ms@2.1.2?dts";
    at https://deno.land/x/opine@1.8.0/deps.ts:55:10

TS2497 [ERROR]: This module can only be referenced with ECMAScript imports/exports by turning on the 'allowSyntheticDefaultImports' flag and referencing its default export.
export { default as ms } from "https://cdn.skypack.dev/ms@2.1.2?dts";
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/x/opine@1.8.0/deps.ts:55:31

Found 4 errors.

Thanks.

cmorten commented 3 years ago

This appears to have been a bug in Deno, and was resolved in Deno 1.15.2.

REF: https://github.com/denoland/deno/issues/12434

Please upgrade to latest with deno upgrade and re-open if still face the same issue!