Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to import - rxjs #633

Closed
BlackGlory opened this issue May 15, 2023 · 10 comments
Closed

Failed to import - rxjs #633

BlackGlory opened this issue May 15, 2023 · 10 comments
Labels
browser Not working in Browser

Comments

@BlackGlory
Copy link

Failing module

Error message

https://esm.sh/v121/[email protected]/es2022/operators.js

/* esm.sh - error */
throw new Error("[esm.sh] " + "resovleESModule: open /esmd/npm/[email protected]/node_modules/rxjs/operators/dist/esm5/operators/index.js: no such file or directory");
export default null;

https://esm.sh/v120/[email protected]/es2022/operators.js

/* esm.sh - esbuild bundle([email protected]/operators) es2022 production */
import{audit as e}from"/v120/[email protected]/es2022/internal/operators/audit.js";import{auditTime as m}from"/v120/[email protected]/es2022/internal/operators/auditTime.js";import{buffer as f}from"/v120/[email protected]/es2022/internal/operators/buffer.js";import{bufferCount as i}from"/v120/[email protected]/es2022/internal/operators/bufferCount.js";import{bufferTime as n}from"/v120/[email protected]/es2022/internal/operators/bufferTime.js";import{bufferToggle as s}from"/v120/[email protected]/es2022/internal/operators/bufferToggle.js";import{bufferWhen as h}from"/v120/[email protected]/es2022/internal/operators/bufferWhen.js";import{catchError as d}from"/v120/[email protected]/es2022/internal/operators/catchError.js";import{combineAll as w}from"/v120/[email protected]/es2022/internal/operators/combineAll.js";import{combineLatestAll as W}from"/v120/[email protected]/es2022/internal/operators/combineLatestAll.js";import{combineLatest as T}from"/v120/[email protected]/es2022/internal/operators/combineLatest.js";import{combineLatestWith as A}from"/v120/[email protected]/es2022/internal/operators/combineLatestWith.js";import{concat as E}from"/v120/[email protected]/es2022/internal/operators/concat.js";import{concatAll as z}from"/v120/[email protected]/es2022/internal/operators/concatAll.js";import{concatMap as v}from"/v120/[email protected]/es2022/internal/operators/concatMap.js";import{concatMapTo as U}from"/v120/[email protected]/es2022/internal/operators/concatMapTo.js";import{concatWith as q}from"/v120/[email protected]/es2022/internal/operators/concatWith.js";import{connect as O}from"/v120/[email protected]/es2022/internal/operators/connect.js";import{count as F}from"/v120/[email protected]/es2022/internal/operators/count.js";import{debounce as N}from"/v120/[email protected]/es2022/internal/operators/debounce.js";import{debounceTime as D}from"/v120/[email protected]/es2022/internal/operators/debounceTime.js";import{defaultIfEmpty as H}from"/v120/[email protected]/es2022/internal/operators/defaultIfEmpty.js";import{delay as P}from"/v120/[email protected]/es2022/internal/operators/delay.js";import{delayWhen as V}from"/v120/[email protected]/es2022/internal/operators/delayWhen.js";import{dematerialize as Y}from"/v120/[email protected]/es2022/internal/operators/dematerialize.js";import{distinct as _}from"/v120/[email protected]/es2022/internal/operators/distinct.js";import{distinctUntilChanged as rr}from"/v120/[email protected]/es2022/internal/operators/distinctUntilChanged.js";import{distinctUntilKeyChanged as er}from"/v120/[email protected]/es2022/internal/operators/distinctUntilKeyChanged.js";import{elementAt as mr}from"/v120/[email protected]/es2022/internal/operators/elementAt.js";import{endWith as fr}from"/v120/[email protected]/es2022/internal/operators/endWith.js";import{every as ir}from"/v120/[email protected]/es2022/internal/operators/every.js";import{exhaust as nr}from"/v120/[email protected]/es2022/internal/operators/exhaust.js";import{exhaustAll as sr}from"/v120/[email protected]/es2022/internal/operators/exhaustAll.js";import{exhaustMap as hr}from"/v120/[email protected]/es2022/internal/operators/exhaustMap.js";import{expand as dr}from"/v120/[email protected]/es2022/internal/operators/expand.js";import{filter as wr}from"/v120/[email protected]/es2022/internal/operators/filter.js";import{finalize as Wr}from"/v120/[email protected]/es2022/internal/operators/finalize.js";import{find as Tr}from"/v120/[email protected]/es2022/internal/operators/find.js";import{findIndex as Ar}from"/v120/[email protected]/es2022/internal/operators/findIndex.js";import{first as Er}from"/v120/[email protected]/es2022/internal/operators/first.js";import{groupBy as zr}from"/v120/[email protected]/es2022/internal/operators/groupBy.js";import{ignoreElements as vr}from"/v120/[email protected]/es2022/internal/operators/ignoreElements.js";import{isEmpty as Ur}from"/v120/[email protected]/es2022/internal/operators/isEmpty.js";import{last as qr}from"/v120/[email protected]/es2022/internal/operators/last.js";import{map as Or}from"/v120/[email protected]/es2022/internal/operators/map.js";import{mapTo as Fr}from"/v120/[email protected]/es2022/internal/operators/mapTo.js";import{materialize as Nr}from"/v120/[email protected]/es2022/internal/operators/materialize.js";import{max as Dr}from"/v120/[email protected]/es2022/internal/operators/max.js";import{merge as Hr}from"/v120/[email protected]/es2022/internal/operators/merge.js";import{mergeAll as Pr}from"/v120/[email protected]/es2022/internal/operators/mergeAll.js";import{flatMap as Vr}from"/v120/[email protected]/es2022/internal/operators/flatMap.js";import{mergeMap as Yr}from"/v120/[email protected]/es2022/internal/operators/mergeMap.js";import{mergeMapTo as _r}from"/v120/[email protected]/es2022/internal/operators/mergeMapTo.js";import{mergeScan as ro}from"/v120/[email protected]/es2022/internal/operators/mergeScan.js";import{mergeWith as eo}from"/v120/[email protected]/es2022/internal/operators/mergeWith.js";import{min as mo}from"/v120/[email protected]/es2022/internal/operators/min.js";import{multicast as fo}from"/v120/[email protected]/es2022/internal/operators/multicast.js";import{observeOn as io}from"/v120/[email protected]/es2022/internal/operators/observeOn.js";import{onErrorResumeNext as no}from"/v120/[email protected]/es2022/internal/operators/onErrorResumeNextWith.js";import{pairwise as so}from"/v120/[email protected]/es2022/internal/operators/pairwise.js";import{partition as ho}from"/v120/[email protected]/es2022/internal/operators/partition.js";import{pluck as bo}from"/v120/[email protected]/es2022/internal/operators/pluck.js";import{publish as go}from"/v120/[email protected]/es2022/internal/operators/publish.js";import{publishBehavior as yo}from"/v120/[email protected]/es2022/internal/operators/publishBehavior.js";import{publishLast as ko}from"/v120/[email protected]/es2022/internal/operators/publishLast.js";import{publishReplay as Mo}from"/v120/[email protected]/es2022/internal/operators/publishReplay.js";import{race as Lo}from"/v120/[email protected]/es2022/internal/operators/race.js";import{raceWith as Co}from"/v120/[email protected]/es2022/internal/operators/raceWith.js";import{reduce as Io}from"/v120/[email protected]/es2022/internal/operators/reduce.js";import{repeat as Ro}from"/v120/[email protected]/es2022/internal/operators/repeat.js";import{repeatWhen as Bo}from"/v120/[email protected]/es2022/internal/operators/repeatWhen.js";import{retry as So}from"/v120/[email protected]/es2022/internal/operators/retry.js";import{retryWhen as Ko}from"/v120/[email protected]/es2022/internal/operators/retryWhen.js";import{refCount as jo}from"/v120/[email protected]/es2022/internal/operators/refCount.js";import{sample as Go}from"/v120/[email protected]/es2022/internal/operators/sample.js";import{sampleTime as Jo}from"/v120/[email protected]/es2022/internal/operators/sampleTime.js";import{scan as Qo}from"/v120/[email protected]/es2022/internal/operators/scan.js";import{sequenceEqual as Xo}from"/v120/[email protected]/es2022/internal/operators/sequenceEqual.js";import{share as Zo}from"/v120/[email protected]/es2022/internal/operators/share.js";import{shareReplay as $o}from"/v120/[email protected]/es2022/internal/operators/shareReplay.js";import{single as oe}from"/v120/[email protected]/es2022/internal/operators/single.js";import{skip as te}from"/v120/[email protected]/es2022/internal/operators/skip.js";import{skipLast as pe}from"/v120/[email protected]/es2022/internal/operators/skipLast.js";import{skipUntil as xe}from"/v120/[email protected]/es2022/internal/operators/skipUntil.js";import{skipWhile as ae}from"/v120/[email protected]/es2022/internal/operators/skipWhile.js";import{startWith as le}from"/v120/[email protected]/es2022/internal/operators/startWith.js";import{subscribeOn as ce}from"/v120/[email protected]/es2022/internal/operators/subscribeOn.js";import{switchAll as ue}from"/v120/[email protected]/es2022/internal/operators/switchAll.js";import{switchMap as be}from"/v120/[email protected]/es2022/internal/operators/switchMap.js";import{switchMapTo as ge}from"/v120/[email protected]/es2022/internal/operators/switchMapTo.js";import{switchScan as ye}from"/v120/[email protected]/es2022/internal/operators/switchScan.js";import{take as ke}from"/v120/[email protected]/es2022/internal/operators/take.js";import{takeLast as Me}from"/v120/[email protected]/es2022/internal/operators/takeLast.js";import{takeUntil as Le}from"/v120/[email protected]/es2022/internal/operators/takeUntil.js";import{takeWhile as Ce}from"/v120/[email protected]/es2022/internal/operators/takeWhile.js";import{tap as Ie}from"/v120/[email protected]/es2022/internal/operators/tap.js";import{throttle as Re}from"/v120/[email protected]/es2022/internal/operators/throttle.js";import{throttleTime as Be}from"/v120/[email protected]/es2022/internal/operators/throttleTime.js";import{throwIfEmpty as Se}from"/v120/[email protected]/es2022/internal/operators/throwIfEmpty.js";import{timeInterval as Ke}from"/v120/[email protected]/es2022/internal/operators/timeInterval.js";import{timeout as je}from"/v120/[email protected]/es2022/internal/operators/timeout.js";import{timeoutWith as Ge}from"/v120/[email protected]/es2022/internal/operators/timeoutWith.js";import{timestamp as Je}from"/v120/[email protected]/es2022/internal/operators/timestamp.js";import{toArray as Qe}from"/v120/[email protected]/es2022/internal/operators/toArray.js";import{window as Xe}from"/v120/[email protected]/es2022/internal/operators/window.js";import{windowCount as Ze}from"/v120/[email protected]/es2022/internal/operators/windowCount.js";import{windowTime as $e}from"/v120/[email protected]/es2022/internal/operators/windowTime.js";import{windowToggle as ot}from"/v120/[email protected]/es2022/internal/operators/windowToggle.js";import{windowWhen as tt}from"/v120/[email protected]/es2022/internal/operators/windowWhen.js";import{withLatestFrom as pt}from"/v120/[email protected]/es2022/internal/operators/withLatestFrom.js";import{zip as xt}from"/v120/[email protected]/es2022/internal/operators/zip.js";import{zipAll as at}from"/v120/[email protected]/es2022/internal/operators/zipAll.js";import{zipWith as lt}from"/v120/[email protected]/es2022/internal/operators/zipWith.js";export{e as audit,m as auditTime,f as buffer,i as bufferCount,n as bufferTime,s as bufferToggle,h as bufferWhen,d as catchError,w as combineAll,T as combineLatest,W as combineLatestAll,A as combineLatestWith,E as concat,z as concatAll,v as concatMap,U as concatMapTo,q as concatWith,O as connect,F as count,N as debounce,D as debounceTime,H as defaultIfEmpty,P as delay,V as delayWhen,Y as dematerialize,_ as distinct,rr as distinctUntilChanged,er as distinctUntilKeyChanged,mr as elementAt,fr as endWith,ir as every,nr as exhaust,sr as exhaustAll,hr as exhaustMap,dr as expand,wr as filter,Wr as finalize,Tr as find,Ar as findIndex,Er as first,Vr as flatMap,zr as groupBy,vr as ignoreElements,Ur as isEmpty,qr as last,Or as map,Fr as mapTo,Nr as materialize,Dr as max,Hr as merge,Pr as mergeAll,Yr as mergeMap,_r as mergeMapTo,ro as mergeScan,eo as mergeWith,mo as min,fo as multicast,io as observeOn,no as onErrorResumeNext,so as pairwise,ho as partition,bo as pluck,go as publish,yo as publishBehavior,ko as publishLast,Mo as publishReplay,Lo as race,Co as raceWith,Io as reduce,jo as refCount,Ro as repeat,Bo as repeatWhen,So as retry,Ko as retryWhen,Go as sample,Jo as sampleTime,Qo as scan,Xo as sequenceEqual,Zo as share,$o as shareReplay,oe as single,te as skip,pe as skipLast,xe as skipUntil,ae as skipWhile,le as startWith,ce as subscribeOn,ue as switchAll,be as switchMap,ge as switchMapTo,ye as switchScan,ke as take,Me as takeLast,Le as takeUntil,Ce as takeWhile,Ie as tap,Re as throttle,Be as throttleTime,Se as throwIfEmpty,Ke as timeInterval,je as timeout,Ge as timeoutWith,Je as timestamp,Qe as toArray,Xe as window,Ze as windowCount,$e as windowTime,ot as windowToggle,tt as windowWhen,pt as withLatestFrom,xt as zip,at as zipAll,lt as zipWith};
//# sourceMappingURL=operators.js.map
@BlackGlory BlackGlory added the browser Not working in Browser label May 15, 2023
@renhiyama
Copy link
Contributor

@ije on a sidenote, there's a typo at resolveESModule being typed as resovleESModule. Hopefully you can find it in your code.

@mradamwalters
Copy link

Hi, we've just found similar behaviour with v121 with selected files in the dom-helpers and react-transition-group packages. As a workaround we can pin to v119.

We can reproduce this in the esm.sh playground by either:
import { Button } from "https://esm.sh/[email protected]"
or
import { Button } from "https://esm.sh/[email protected]"

react-bootstrap triggers dependency imports in the browser including the following files which fail with error 500, reporting same error as above:
https://esm.sh/v121/[email protected]/es2022/css.development.js
https://esm.sh/v121/[email protected]/es2022/Transition.development.js
https://esm.sh/v121/[email protected]/es2022/transitionEnd.development.js
https://esm.sh/v121/[email protected]/es2022/camelize.development.js

reactstrap also fails to import different files from dom-helpers:
https://esm.sh/v121/[email protected]/es2022/addClass.development.js
https://esm.sh/v121/[email protected]/es2022/removeClass.development.js

As a workaround then pinning to version v119 works:
https://esm.sh/v119/[email protected]/es2022/transitionEnd.development.js
https://esm.sh/v119/[email protected]/es2022/removeClass.development.js

@renhiyama
Copy link
Contributor

@mradamwalters could you confirm whether one of your URLs being requested by the main URL has .mjs file extension?
If so, it might be the bug found at #634 . I found out that mjs file extension has no content being served by esm.sh

@mradamwalters
Copy link

Hi @renhiyama - thank you. There are a few .mjs files called in the dependency chain but they do seem to be working ok in this case e.g.:
https://esm.sh/v121/[email protected]/es2022/react-bootstrap.development.mjs
https://esm.sh/v121/[email protected]/es2022/react-dom.development.mjs

For these packages it seems to be certain files within a package not working in v121 (and sometimes working/not working in v120 either).

@renhiyama
Copy link
Contributor

For your case, I would suggest looking which file's code is empty; it might be tiresome but for me I've implemented a custom downloader for urlimports so I can add a few checks to check whether a file is empty.

@renhiyama
Copy link
Contributor

I just found that even v119 causes this issue sometimes; for me https://esm.sh/v119/[email protected]/node/bl.mjs content is empty ...

@renhiyama
Copy link
Contributor

Looks like random mjs files from older versions don't respond too. Even v118 worked fine before; now it doesn't : https://esm.sh/v118/[email protected]/node/onetime.mjs

@renhiyama
Copy link
Contributor

@ije on a sidenote, there's a typo at resolveESModule being typed as resovleESModule. Hopefully you can find it in your code.

@ije bump for this msg incase you didnt notice.

@ije
Copy link
Member

ije commented May 17, 2023

@ije on a sidenote, there's a typo at resolveESModule being typed as resovleESModule. Hopefully you can find it in your code.

@ije bump for this msg incase you didnt notice.

thanks i noticed it

@ije ije closed this as completed in 96e8bf0 May 17, 2023
@ije
Copy link
Member

ije commented May 17, 2023

@BlackGlory @renhiyama this was broken in v120, just fixed and added a testing for it. thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser Not working in Browser
Projects
None yet
Development

No branches or pull requests

4 participants