HewloThere
HewloThere
DDeno
Created by HewloThere on 10/4/2024 in #help
deno gives 401 unauthorized for imports with an `npm:` specifier, but npm, yarn and pnpm all work?
have added a comment here that i managed to resolve it for myself https://github.com/denoland/deno/issues/26033#issuecomment-2422657021
25 replies
DDeno
Created by HewloThere on 10/7/2024 in #help
Type resolution for modules imported with `npm:` specifier
i think i figured out that the missing node types error only happens if you don't explicitly install @types/node, because vite only has it as a dev dependency after installing them, it seems to work. so i don't think the node types needs to be an issue? but the esbuild type resolution issue still happens regardless. i added a comment on the github issue you made earlier with some weird edge cases or whatever i found. not sure if helpful
26 replies
DDeno
Created by HewloThere on 10/7/2024 in #help
Type resolution for modules imported with `npm:` specifier
ok, thank you!
26 replies
DDeno
Created by HewloThere on 10/7/2024 in #help
Type resolution for modules imported with `npm:` specifier
ah ok i see. so report it on the vscode deno repo? or main deno repo?
26 replies
DDeno
Created by HewloThere on 10/7/2024 in #help
Type resolution for modules imported with `npm:` specifier
err sorry if my question was confusing. i was meaning more so, if it is a problem with how deno does module resolution or if it's just a problem with the language server. not sure if same answer? the deno language server is definitely enabled tho
26 replies
DDeno
Created by HewloThere on 10/7/2024 in #help
Type resolution for modules imported with `npm:` specifier
sorry for another question - is there anything i should do to determine if it's the vscode extension or deno itself? (wanna make sure i report it in the right repo)
26 replies
DDeno
Created by HewloThere on 10/7/2024 in #help
Type resolution for modules imported with `npm:` specifier
ok, will do
26 replies
DDeno
Created by HewloThere on 10/7/2024 in #help
Type resolution for modules imported with `npm:` specifier
ah ok. same issue or separate?
26 replies
DDeno
Created by HewloThere on 10/7/2024 in #help
Type resolution for modules imported with `npm:` specifier
but it's ok 🙂 they're not a big deal
26 replies
DDeno
Created by HewloThere on 10/7/2024 in #help
Type resolution for modules imported with `npm:` specifier
No description
26 replies
DDeno
Created by HewloThere on 10/7/2024 in #help
Type resolution for modules imported with `npm:` specifier
yea. if i open the index.d.ts file for @types/node in vscode, the errors go away, but even tho the file has the reference like below at the top, it seems to not resolve:
/// <reference types="node" />
/// <reference types="node" />
26 replies
DDeno
Created by HewloThere on 10/7/2024 in #help
Type resolution for modules imported with `npm:` specifier
if i'm getting "Cannot find namespace 'NodeJS'." errors, is there any fix in deno?
26 replies
DDeno
Created by HewloThere on 10/7/2024 in #help
Type resolution for modules imported with `npm:` specifier
ah i see, sorry i was looking here. probably a bit outdated https://docs.deno.com/runtime/reference/ts_config_migration/#suppling-"types"-in-deno.json
26 replies
DDeno
Created by HewloThere on 10/7/2024 in #help
Type resolution for modules imported with `npm:` specifier
heya, sorry for another message - i'm going to reply to the github issue soon, after i attempt to pinpoint the issue a little bit but just had a quick question while i do that. if i have @types/node as a (dev) dependency in my package.json, if i want deno to use those types in compilerOptions.types, is the correct thing to do this? deno.json
{
"nodeModulesDir": "auto",
"lock": true,
"compilerOptions": {
"types": ["node"]
},
"exclude": ["./dist"]
}
{
"nodeModulesDir": "auto",
"lock": true,
"compilerOptions": {
"types": ["node"]
},
"exclude": ["./dist"]
}
package.json
{
"dependencies": {
"vite": "^6.0.0-beta.2",
"esbuild": "^0.24.0",
"postcss": "^8.4.47",
"rollup": "^4.22.5"
},
"devDependencies": {
"@types/node": "22.7.4"
}
}
{
"dependencies": {
"vite": "^6.0.0-beta.2",
"esbuild": "^0.24.0",
"postcss": "^8.4.47",
"rollup": "^4.22.5"
},
"devDependencies": {
"@types/node": "22.7.4"
}
}
26 replies
DDeno
Created by HewloThere on 10/7/2024 in #help
Type resolution for modules imported with `npm:` specifier
thank you!
26 replies
DDeno
Created by HewloThere on 10/4/2024 in #help
deno gives 401 unauthorized for imports with an `npm:` specifier, but npm, yarn and pnpm all work?
sorry for delay, i posted it here: https://github.com/denoland/deno/issues/26033
25 replies
DDeno
Created by HewloThere on 10/4/2024 in #help
deno gives 401 unauthorized for imports with an `npm:` specifier, but npm, yarn and pnpm all work?
not sure if they somehow help at all but i can make a bug report soon. if those give away the issue tho then please let me know 🙂
25 replies
DDeno
Created by HewloThere on 10/4/2024 in #help
deno gives 401 unauthorized for imports with an `npm:` specifier, but npm, yarn and pnpm all work?
sorry will try make in a bit 🙂 i ran npm config ls -l , which to my understanding, prints the fully resolved config for npm (along with the file/place it came from). i attached the result after replacing my username with myusername and my company with mycompany (nothing else changed) i also ran yarn config --json (and converted the newline-delimited json to a json array) and did the same replacements and uploaded that
25 replies
DDeno
Created by HewloThere on 10/4/2024 in #help
deno gives 401 unauthorized for imports with an `npm:` specifier, but npm, yarn and pnpm all work?
ahhh i forgot the global one. i don't think it's that but lets see
25 replies
DDeno
Created by HewloThere on 10/4/2024 in #help
deno gives 401 unauthorized for imports with an `npm:` specifier, but npm, yarn and pnpm all work?
when running the deno scripts, i was in ~/Documents/deno-scripts, and the only .npmrc between there and my home directory is the one in my home directory (which i shared above)
25 replies