Comments (6)
Does esm.sh support package name self-reference in import/require statements? openai
uses package name self-reference (e.g. import * as API from 'openai/resources/index'
) and an export map with wildcards, so my hunch is there's some issue with how esm.sh handles that.
from esm.sh.
I am a maintainer of the openai
npm package; this bug is also being discussed here: openai/openai-node#393.
Note that
import OpenAI from "https://esm.sh/[email protected]"
does work, but all more recent versions, including 4.12.0, do not work. The diff from 4.11.0 to 4.12.0 is here: openai/openai-node@v4.11.1...v4.12.0
Though note some of those changes (such as export type
-> export import
) were later reverted.
There is no resources.js
in our codebase, only a resources
folder with an index.js
. None of our imports attempt to import from eg './resources'
without doing './resources/index.js'
or equivalent, so I suspect this may be a bug in esm.sh's module resolution magic.
from esm.sh.
cc @ije since I think this may be a regression…
from esm.sh.
just deploy a fix patch for the issue, it should work again(also a testing added)
from esm.sh.
sorry for the late update
from esm.sh.
Thank you so much @ije !
from esm.sh.
Related Issues (20)
- Wrong X-Typescript-Types url for `@vueuse/shared` HOT 1
- Failed to import - primereact (alias cannot contain slashes) HOT 2
- Feature request - download lists HOT 5
- Invalid response status code
- Failed to import - @mui/icons-material/DeleteOutline HOT 1
- Failed to init CLI on Deno HOT 1
- Feature request - SSE for package new version HOT 2
- No versions available for esm-node-services HOT 9
- "esmLexer: invalid syntax, require javascript/typescript" on valid file HOT 5
- Not possible to import a React client component in Next.JS via esm.sh
- Use custom node polyfill via `alias` and `external` query
- @observablehq/plot prototypes are missing a method due to skipped side effects
- Support GitHub Gists
- Failed to import - d3 HOT 1
- Failed init cli on NPM HOT 7
- Support importing modules from jsr.io HOT 1
- how to get react profiling version
- Failed to import - basehub/react - shows 500 Internal Server Error. - on commit
- Failed to import - @mui/material HOT 6
- Failed to import - openlayers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esm.sh.