Rick
Rick
DDeno
Created by Rick on 8/30/2024 in #help
Loading hybrid packages from npm (graphql-tag)
i am currently trying to get dagger.io to run using deno and i am currently hitting this import issue:
error: Uncaught SyntaxError: The requested module 'graphql-tag' does not provide an export named 'gql'
at <anonymous> (file:///Users/igl/Library/Caches/deno/npm/registry.npmjs.org/@dagger.io/dagger/0.12.6/dist/index.js:3:10)
error: Uncaught SyntaxError: The requested module 'graphql-tag' does not provide an export named 'gql'
at <anonymous> (file:///Users/igl/Library/Caches/deno/npm/registry.npmjs.org/@dagger.io/dagger/0.12.6/dist/index.js:3:10)
graphql-tag seems to be a "hybrid" package with these fields:
"main": "./main.js",
"module": "./lib/index.js",
"jsnext:main": "./lib/index.js",
"main": "./main.js",
"module": "./lib/index.js",
"jsnext:main": "./lib/index.js",
if i slightly modify their package.json in my deno cache and set "main" to "./lib/index.js" it works fine. I am not so familiar with how deno recognizes a hybrid package. What would the best approach here be? Can this be fixed with a small patch to graphql-tag?
2 replies