fix library version of a dependency
Putting this to
deno.json
but having this in deno.lock:
Generated after deleting deno.lock
, and doing deno cache --allow-import -r main.ts
Please help finding a good tag, I found just Deno CLI for that.6 Replies
I'm not able to reproduce that. For me only
gpc-metadata@6.1.0
is installed. What I tried:
1. Run deno init
2. Add gcp-metadata@6.1.0
to the imports
section in deno.json
3. Run deno install
-> check lockfileThat version must be a dependancy of
google-auth-library@9.15.1
, that you are not able to override like that...
Depending on how that module imports gcp-metadata
, you might be able to override it maybe using a import-map
definition that targets the exact version they use in their import statements....
Maybe you need to use vendor
🤷♀️What is the import-map syntax then?
The offending dependency is here: https://github.com/googleapis/google-auth-library-nodejs/blob/main/package.json#L23
GitHub
google-auth-library-nodejs/package.json at main · googleapis/google...
🔑 Google Auth Library for Node.js. Contribute to googleapis/google-auth-library-nodejs development by creating an account on GitHub.
Seems like they use a
Package.json
file to define the version used.
I have no idea how to override that... (Still new to deno myself too)
Maybe try to use vendor
and change that file for your own version? 🤔
AFAIK, the vendor
option is like making the package a devVersion
that creates local package dependancies in your workspace.@pihentagy I just found this that you might want to take a look at, it might help you in this case: https://jspm.org/docs/integrations
Especially when combined with: https://jspm.org/docs/integrations#nodejs-loader
JSPM - Integrations
JSPM Integrations Documentation