Sean Knowles
Sean Knowles2mo ago

Deno install npm: specificers not working at the moment.

I have tried Deno Install and have added the packages to my deno.json using deno add with the npm: prefix.
{
"name": "@scope/opsap-data",
"exports": "./mod.ts",
"version": "0.0.1",
"imports": {
"@momiji/cors": "jsr:@momiji/cors@^1.0.1",
"@oak/oak": "jsr:@oak/oak@^16.1.0",
"rxdb": "npm:rxdb@^15.32.0",
"rxjs": "npm:rxjs@^7.8.1"
}
}
{
"name": "@scope/opsap-data",
"exports": "./mod.ts",
"version": "0.0.1",
"imports": {
"@momiji/cors": "jsr:@momiji/cors@^1.0.1",
"@oak/oak": "jsr:@oak/oak@^16.1.0",
"rxdb": "npm:rxdb@^15.32.0",
"rxjs": "npm:rxjs@^7.8.1"
}
}
However no matter what I try, I can't run any projects that were previously working and can't seem to get the imports working for rxdb npm packages. Stuck again, any help would be greatly appreciated. If I try to run a previous backend service that was working I get this now.
seanknowles@ip-10-23-44-20 ‹ main ↑●● › : ~/Projects/Zemili/moonrepoV3/apps/zemili/backend
[0] % deno task dev
Task dev deno run -A --watch main.ts
Watcher Process started.
error: Could not find a matching package for 'npm:path-to-regexp@6.2.1' in a package.json file. You must specify this as a package.json dependency when the node_modules folder is not managed by Deno.
at https://jsr.io/@oak/oak/16.1.0/deps.ts:87:8
Watcher Process failed. Restarting on file change...
seanknowles@ip-10-23-44-20 ‹ main ↑●● › : ~/Projects/Zemili/moonrepoV3/apps/zemili/backend
[0] % deno task dev
Task dev deno run -A --watch main.ts
Watcher Process started.
error: Could not find a matching package for 'npm:path-to-regexp@6.2.1' in a package.json file. You must specify this as a package.json dependency when the node_modules folder is not managed by Deno.
at https://jsr.io/@oak/oak/16.1.0/deps.ts:87:8
Watcher Process failed. Restarting on file change...
No description
No description
14 Replies
Sean Knowles
Sean Knowles2mo ago
No description
marvinh.
marvinh.2mo ago
That's odd, I only get this error when DENO_FUTURE=1 is set, but not without it. Do you happen to have a package.json file in the same folder?
Sean Knowles
Sean Knowles2mo ago
I am on canary deno, should I unset the DENO_FUTURE=1 (remove it)? No package.json - just a deno.json The opsap-data package is in my packages folder part of workspaces Its imported into a frontend and backend project in my apps folder.
Sean Knowles
Sean Knowles2mo ago
The full monorepo is public, so you can test and replicate if its helpful https://github.com/zemili-group/moonrepoV3
GitHub
GitHub - zemili-group/moonrepoV3: Deno monorepo on deno deploy all ...
Deno monorepo on deno deploy all things zemil-group - zemili-group/moonrepoV3
marvinh.
marvinh.2mo ago
Can reproduce it and it very much looks like a bug. It seems like package.json files in other workspace members influence the resolution of the backend workspace. Filed an issue for that https://github.com/denoland/deno/issues/25355
GitHub
Bug: "Could not find matching package in package.json file" with ...
For some reason it seems like having a package.json in a different workspace member affects resolution in a workspace member that doesn't have one. In this case the "Could not find matchin...
Sean Knowles
Sean Knowles2mo ago
Thanks Marvinh, muchos gracias for helping out. Is there a temporary workaround that spring to mind that I could try? Non of my projects will run at the moment.
marvinh.
marvinh.2mo ago
the easiest is probably to downgrade to the last deno version you remember working
Sean Knowles
Sean Knowles2mo ago
Okay will try it Last one I remember working was canary from a few days ago RC 2 didn't work for me, it was a canary version just after the release of rc2
marvinh.
marvinh.2mo ago
you can upgrade to a specific commit by running
deno upgrade <commit-sha>
deno upgrade <commit-sha>
Sean Knowles
Sean Knowles2mo ago
Reverted back tried different versions I am sorry to report that it's not currently working... Will have to wait for the fix
marvinh.
marvinh.2mo ago
I'm sorry to hear that. I'll try to up the priority of that ticket internally
Sean Knowles
Sean Knowles2mo ago
seanknowles@ip-10-23-44-20 ‹ main ● › : ~/Projects/Zemili/moonrepoV3/apps/zemili/backend
[0] % deno task dev
Task dev deno run -A --watch main.ts
Watcher Process started.
error: Could not find a matching package for 'npm:path-to-regexp@6.2.1' in a package.json file. You must specify this as a package.json dependency when the node_modules folder is not managed by Deno.
at https://jsr.io/@oak/oak/16.1.0/deps.ts:87:8
Watcher Process failed. Restarting on file change...
seanknowles@ip-10-23-44-20 ‹ main ● › : ~/Projects/Zemili/moonrepoV3/apps/zemili/backend
[0] % deno task dev
Task dev deno run -A --watch main.ts
Watcher Process started.
error: Could not find a matching package for 'npm:path-to-regexp@6.2.1' in a package.json file. You must specify this as a package.json dependency when the node_modules folder is not managed by Deno.
at https://jsr.io/@oak/oak/16.1.0/deps.ts:87:8
Watcher Process failed. Restarting on file change...
Is this related, because I had this issue before but and then I am sure I resolved it. I can't figure out if I am missing something? I've commented out all services that were rxdb dependent to try and get back to a state when things worked. None of my projects will run, with the
Could not find a matching package for 'npm:path-to-regexp@6.2.1' in a package.json file. You must specify this as a
Could not find a matching package for 'npm:path-to-regexp@6.2.1' in a package.json file. You must specify this as a
I've litterally added this packag everywhere in my project, every backend application and root deno.json has it. Its an internal Oak package. Am I missing something?
korosuke
korosuke2mo ago
Hi, I could start deno task dev once removed deno.lock file with dnoe version 1.46.1. I hope it helps you.
No description
Sean Knowles
Sean Knowles2mo ago
mmmm Okay will try deno 1.46.1 Legend, will circle back if I have success @marvinh. @korosuke Yoyo my dudes, seems to be resolved on latest canary release!