korosuke
korosuke4mo ago

Lock file does not have any hashes of modules

Hello everyone. I need your help. I'm trying to generate deno.lock by using command ↓ in Mac. (Deno 1.46.1)
deno cache --lock=deno.lock --frozen=false -c=deno.json function/mod.ts
deno cache --lock=deno.lock --frozen=false -c=deno.json function/mod.ts
It generates lockfiles without hashes. (Like this. ↓)
{
"version": "3",
"redirects": {
"https://deno.land/x/lambda/mod.ts": "https://deno.land/x/lambda@1.46.1/mod.ts"
},
"remote": {
"https://deno.land/x/lambda@1.46.1/mod.ts": "315b66c882a4b502bcd2ccdbfdf72892cb657378f6af0c78f8460c94946f7d5c"
},
"workspace": {
"dependencies": [
"npm:aws-crt@^1.21.8",
"npm:encoding@^0.1.13"
],
"members": {
"packages/functions_run_transfer": {
"dependencies": [
"npm:@aws-sdk/client-s3@3.614.0",
"npm:@aws-sdk/client-ssm@3.616.0",
"npm:@google-cloud/bigquery-data-transfer@4.3.0",
"npm:@google-cloud/bigquery@7.8.0"
]
}
}
}
}
{
"version": "3",
"redirects": {
"https://deno.land/x/lambda/mod.ts": "https://deno.land/x/lambda@1.46.1/mod.ts"
},
"remote": {
"https://deno.land/x/lambda@1.46.1/mod.ts": "315b66c882a4b502bcd2ccdbfdf72892cb657378f6af0c78f8460c94946f7d5c"
},
"workspace": {
"dependencies": [
"npm:aws-crt@^1.21.8",
"npm:encoding@^0.1.13"
],
"members": {
"packages/functions_run_transfer": {
"dependencies": [
"npm:@aws-sdk/client-s3@3.614.0",
"npm:@aws-sdk/client-ssm@3.616.0",
"npm:@google-cloud/bigquery-data-transfer@4.3.0",
"npm:@google-cloud/bigquery@7.8.0"
]
}
}
}
}
But when I execute this command in a docker container, it generates hashes. How can I generate lockfile with hashes in Mac? P.S I tried with --reload , but the result was same.
No description
2 Replies
korosuke
korosukeOP4mo ago
Ok, I got it.
deno cache --reload=npm: --frozen=false -c=deno.json function/mod.ts
deno cache --reload=npm: --frozen=false -c=deno.json function/mod.ts
When I ran with arg --reload=npm: , it generated a lock file with all hashes. And after this command, Deno always generates a valid lock file with --reload args. (it works without =:npm arg) I don't know what happened, but my troubles solved. thanks.
bartlomieju
bartlomieju4mo ago
Cc @dsherret in case this is not expected

Did you find this page helpful?