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?
sorry for delay, i posted it here: https://github.com/denoland/deno/issues/26033
16 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 🙂
16 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
16 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
16 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)
16 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?
afaik it only looks in 1 place? but if you can let me know where to look (apart from my home directory, because the one i shared is the one from my home dir) then i'm happy to share
16 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?
here's an anonymized npm config list --json (apparently it's too long to copy)
16 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?
debug/backtrace log (replaced my username and company name, changed the ips - rest is the asme):
~ RUST_BACKTRACE=1 DENO_LOG=debug deno run -A npm:@angular/cli 
DEBUG RS - deno::args:932 - Finished config loading.
DEBUG RS - deno::cache::cache_db:168 - Opening cache /Users/myusername/Library/Caches/deno/dep_analysis_cache_v2...
DEBUG RS - deno::cache::cache_db:168 - Opening cache /Users/myusername/Library/Caches/deno/node_analysis_cache_v2...
DEBUG RS - deno::cache::cache_db:168 - Opening cache /Users/myusername/Library/Caches/deno/v8_code_cache_v2...
DEBUG RS - deno::npm::managed::resolution:282 - Running npm resolution.
DEBUG RS - hyper_util::client::legacy::connect::dns:122 - resolving host="packages.mycompany.com"
DEBUG RS - hyper_util::client::legacy::connect::http:643 - connecting to 123.123.123.123:443
DEBUG RS - hyper_util::client::legacy::connect::http:646 - connected to 456.456.456.456:443
DEBUG RS - h2::client:1281 - binding client connection
DEBUG RS - h2::client:1286 - client connection bound
DEBUG RS - h2::codec::framed_write:213 - send frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }
DEBUG RS - h2::proto::connection:138 - Connection; peer=Client
DEBUG RS - hyper_util::client::legacy::pool:396 - pooling idle connection for ("https", packages.mycompany.com)
DEBUG RS - h2::codec::framed_write:213 - send frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 }
DEBUG RS - h2::codec::framed_write:213 - send frame=Headers { stream_id: StreamId(1), flags: (0x5: END_HEADERS | END_STREAM) }
DEBUG RS - h2::codec::framed_read:405 - received frame=Settings { flags: (0x0), max_concurrent_streams: 128, initial_window_size: 65536, max_frame_size: 16777215 }
DEBUG RS - h2::codec::framed_write:213 - send frame=Settings { flags: (0x1: ACK) }
DEBUG RS - h2::codec::framed_read:405 - received frame=WindowUpdate { stream_id: StreamId(0), size_increment: 2147418112 }
DEBUG RS - h2::codec::framed_read:405 - received frame=Settings { flags: (0x1: ACK) }
DEBUG RS - h2::proto::settings:56 - received settings ACK; applying Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }
DEBUG RS - h2::codec::framed_read:405 - received frame=Headers { stream_id: StreamId(1), flags: (0x4: END_HEADERS) }
DEBUG RS - h2::codec::framed_read:405 - received frame=Data { stream_id: StreamId(1) }
DEBUG RS - h2::codec::framed_read:405 - received frame=Data { stream_id: StreamId(1), flags: (0x1: END_STREAM) }
DEBUG RS - h2::codec::framed_write:213 - send frame=GoAway { error_code: NO_ERROR, last_stream_id: StreamId(0) }
DEBUG RS - h2::proto::connection:428 - Connection::poll; connection error error=GoAway(b"", NO_ERROR, Library)
error: Error getting response at https://packages.mycompany.com/artifactory/api/npm/npm-remote/@angular/cli%25C2%25A0 for package "@angular/cli%C2%A0": Bad response: 401

{
"errors" : [ {
"status" : 401,
"message" : "Bad credentials"
} ]
}

Stack backtrace:
0: std::backtrace::Backtrace::capture
1: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
2: deno::npm::managed::ManagedCliNpmResolver::add_package_reqs_raw::{{closure}}
3: deno::npm::managed::ManagedCliNpmResolver::add_package_reqs::{{closure}}
4: deno::worker::CliMainWorkerFactory::create_custom_worker::{{closure}}
5: deno::worker::CliMainWorkerFactory::create_main_worker::{{closure}}
6: deno::tools::run::run_script::{{closure}}
7: deno::spawn_subcommand::{{closure}}
8: <deno_unsync::tokio::task::MaskFutureAsSend<F> as core::future::future::Future>::poll
9: tokio::runtime::task::raw::poll
10: deno::main
11: std::sys_common::backtrace::__rust_begin_short_backtrace
12: _main
~ RUST_BACKTRACE=1 DENO_LOG=debug deno run -A npm:@angular/cli 
DEBUG RS - deno::args:932 - Finished config loading.
DEBUG RS - deno::cache::cache_db:168 - Opening cache /Users/myusername/Library/Caches/deno/dep_analysis_cache_v2...
DEBUG RS - deno::cache::cache_db:168 - Opening cache /Users/myusername/Library/Caches/deno/node_analysis_cache_v2...
DEBUG RS - deno::cache::cache_db:168 - Opening cache /Users/myusername/Library/Caches/deno/v8_code_cache_v2...
DEBUG RS - deno::npm::managed::resolution:282 - Running npm resolution.
DEBUG RS - hyper_util::client::legacy::connect::dns:122 - resolving host="packages.mycompany.com"
DEBUG RS - hyper_util::client::legacy::connect::http:643 - connecting to 123.123.123.123:443
DEBUG RS - hyper_util::client::legacy::connect::http:646 - connected to 456.456.456.456:443
DEBUG RS - h2::client:1281 - binding client connection
DEBUG RS - h2::client:1286 - client connection bound
DEBUG RS - h2::codec::framed_write:213 - send frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }
DEBUG RS - h2::proto::connection:138 - Connection; peer=Client
DEBUG RS - hyper_util::client::legacy::pool:396 - pooling idle connection for ("https", packages.mycompany.com)
DEBUG RS - h2::codec::framed_write:213 - send frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 }
DEBUG RS - h2::codec::framed_write:213 - send frame=Headers { stream_id: StreamId(1), flags: (0x5: END_HEADERS | END_STREAM) }
DEBUG RS - h2::codec::framed_read:405 - received frame=Settings { flags: (0x0), max_concurrent_streams: 128, initial_window_size: 65536, max_frame_size: 16777215 }
DEBUG RS - h2::codec::framed_write:213 - send frame=Settings { flags: (0x1: ACK) }
DEBUG RS - h2::codec::framed_read:405 - received frame=WindowUpdate { stream_id: StreamId(0), size_increment: 2147418112 }
DEBUG RS - h2::codec::framed_read:405 - received frame=Settings { flags: (0x1: ACK) }
DEBUG RS - h2::proto::settings:56 - received settings ACK; applying Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }
DEBUG RS - h2::codec::framed_read:405 - received frame=Headers { stream_id: StreamId(1), flags: (0x4: END_HEADERS) }
DEBUG RS - h2::codec::framed_read:405 - received frame=Data { stream_id: StreamId(1) }
DEBUG RS - h2::codec::framed_read:405 - received frame=Data { stream_id: StreamId(1), flags: (0x1: END_STREAM) }
DEBUG RS - h2::codec::framed_write:213 - send frame=GoAway { error_code: NO_ERROR, last_stream_id: StreamId(0) }
DEBUG RS - h2::proto::connection:428 - Connection::poll; connection error error=GoAway(b"", NO_ERROR, Library)
error: Error getting response at https://packages.mycompany.com/artifactory/api/npm/npm-remote/@angular/cli%25C2%25A0 for package "@angular/cli%C2%A0": Bad response: 401

{
"errors" : [ {
"status" : 401,
"message" : "Bad credentials"
} ]
}

Stack backtrace:
0: std::backtrace::Backtrace::capture
1: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
2: deno::npm::managed::ManagedCliNpmResolver::add_package_reqs_raw::{{closure}}
3: deno::npm::managed::ManagedCliNpmResolver::add_package_reqs::{{closure}}
4: deno::worker::CliMainWorkerFactory::create_custom_worker::{{closure}}
5: deno::worker::CliMainWorkerFactory::create_main_worker::{{closure}}
6: deno::tools::run::run_script::{{closure}}
7: deno::spawn_subcommand::{{closure}}
8: <deno_unsync::tokio::task::MaskFutureAsSend<F> as core::future::future::Future>::poll
9: tokio::runtime::task::raw::poll
10: deno::main
11: std::sys_common::backtrace::__rust_begin_short_backtrace
12: _main
16 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?
here's my ~/.npmrc (i replaced all instances of my password with "supersecret", all instances of my username with "myusername" and all instances of my company name with "mycompany" - nothing more):
registry=https://packages.mycompany.com/artifactory/api/npm/npm-remote
@mycompanysox:registry=https://packages.mycompany.com/artifactory/api/npm/mycompany-npm/
@fortawesome:registry=https://packages.mycompany.com/artifactory/api/npm/npm-remote-fontawesome/
@mycompany:registry=https://packages.mycompany.com/artifactory/api/npm/mycompany-npm/
//packages.mycompany.com/artifactory/api/npm/mycompany-npm/:_password=supersecret
//packages.mycompany.com/artifactory/api/npm/mycompany-npm/:username=myusername
//packages.mycompany.com/artifactory/api/npm/mycompany-npm/:email=myusername@mycompany.com
//packages.mycompany.com/artifactory/api/npm/mycompany-npm/:always-auth=true

//packages.mycompany.com/api/npm/mycompany-npm/:_password=supersecret
//packages.mycompany.com/api/npm/mycompany-npm/:username=myusername
//packages.mycompany.com/api/npm/mycompany-npm/:email=myusername@mycompany.com
//packages.mycompany.com/api/npm/mycompany-npm/:always-auth=true

//packages.mycompany.com/artifactory/api/npm/npm-remote-fontawesome/:_password=supersecret
//packages.mycompany.com/artifactory/api/npm/npm-remote-fontawesome/:username=myusername
//packages.mycompany.com/artifactory/api/npm/npm-remote-fontawesome/:email=myusername@mycompany.com
//packages.mycompany.com/artifactory/api/npm/npm-remote-fontawesome/:always-auth=true

//packages.mycompany.com/api/npm/npm-remote-fontawesome/:_password=supersecret
//packages.mycompany.com/api/npm/npm-remote-fontawesome/:username=myusername
//packages.mycompany.com/api/npm/npm-remote-fontawesome/:email=myusername@mycompany.com
//packages.mycompany.com/api/npm/npm-remote-fontawesome/:always-auth=true

//packages.mycompany.com/artifactory/api/npm/npm-remote-fontawesome/:_password=supersecret
//packages.mycompany.com/artifactory/api/npm/npm-remote-fontawesome/:username=myusername
//packages.mycompany.com/artifactory/api/npm/npm-remote-fontawesome/:email=myusername@mycompany.com
//packages.mycompany.com/artifactory/api/npm/npm-remote-fontawesome/:always-auth=true

//packages.mycompany.com/api/npm/npm-remote-fontawesome/:_password=supersecret
//packages.mycompany.com/api/npm/npm-remote-fontawesome/:username=myusername
//packages.mycompany.com/api/npm/npm-remote-fontawesome/:email=myusername@mycompany.com
//packages.mycompany.com/api/npm/npm-remote-fontawesome/:always-auth=true

//packages.mycompany.com/artifactory/api/npm/npm-remote/:_password=supersecret
//packages.mycompany.com/artifactory/api/npm/npm-remote/:username=myusername
//packages.mycompany.com/artifactory/api/npm/npm-remote/:email=myusername@mycompany.com
//packages.mycompany.com/artifactory/api/npm/npm-remote/:always-auth=true

//packages.mycompany.com/api/npm/npm-remote/:_password=supersecret
//packages.mycompany.com/api/npm/npm-remote/:username=myusername
//packages.mycompany.com/api/npm/npm-remote/:email=myusername@mycompany.com
//packages.mycompany.com/api/npm/npm-remote/:always-auth=true
registry=https://packages.mycompany.com/artifactory/api/npm/npm-remote
@mycompanysox:registry=https://packages.mycompany.com/artifactory/api/npm/mycompany-npm/
@fortawesome:registry=https://packages.mycompany.com/artifactory/api/npm/npm-remote-fontawesome/
@mycompany:registry=https://packages.mycompany.com/artifactory/api/npm/mycompany-npm/
//packages.mycompany.com/artifactory/api/npm/mycompany-npm/:_password=supersecret
//packages.mycompany.com/artifactory/api/npm/mycompany-npm/:username=myusername
//packages.mycompany.com/artifactory/api/npm/mycompany-npm/:email=myusername@mycompany.com
//packages.mycompany.com/artifactory/api/npm/mycompany-npm/:always-auth=true

//packages.mycompany.com/api/npm/mycompany-npm/:_password=supersecret
//packages.mycompany.com/api/npm/mycompany-npm/:username=myusername
//packages.mycompany.com/api/npm/mycompany-npm/:email=myusername@mycompany.com
//packages.mycompany.com/api/npm/mycompany-npm/:always-auth=true

//packages.mycompany.com/artifactory/api/npm/npm-remote-fontawesome/:_password=supersecret
//packages.mycompany.com/artifactory/api/npm/npm-remote-fontawesome/:username=myusername
//packages.mycompany.com/artifactory/api/npm/npm-remote-fontawesome/:email=myusername@mycompany.com
//packages.mycompany.com/artifactory/api/npm/npm-remote-fontawesome/:always-auth=true

//packages.mycompany.com/api/npm/npm-remote-fontawesome/:_password=supersecret
//packages.mycompany.com/api/npm/npm-remote-fontawesome/:username=myusername
//packages.mycompany.com/api/npm/npm-remote-fontawesome/:email=myusername@mycompany.com
//packages.mycompany.com/api/npm/npm-remote-fontawesome/:always-auth=true

//packages.mycompany.com/artifactory/api/npm/npm-remote-fontawesome/:_password=supersecret
//packages.mycompany.com/artifactory/api/npm/npm-remote-fontawesome/:username=myusername
//packages.mycompany.com/artifactory/api/npm/npm-remote-fontawesome/:email=myusername@mycompany.com
//packages.mycompany.com/artifactory/api/npm/npm-remote-fontawesome/:always-auth=true

//packages.mycompany.com/api/npm/npm-remote-fontawesome/:_password=supersecret
//packages.mycompany.com/api/npm/npm-remote-fontawesome/:username=myusername
//packages.mycompany.com/api/npm/npm-remote-fontawesome/:email=myusername@mycompany.com
//packages.mycompany.com/api/npm/npm-remote-fontawesome/:always-auth=true

//packages.mycompany.com/artifactory/api/npm/npm-remote/:_password=supersecret
//packages.mycompany.com/artifactory/api/npm/npm-remote/:username=myusername
//packages.mycompany.com/artifactory/api/npm/npm-remote/:email=myusername@mycompany.com
//packages.mycompany.com/artifactory/api/npm/npm-remote/:always-auth=true

//packages.mycompany.com/api/npm/npm-remote/:_password=supersecret
//packages.mycompany.com/api/npm/npm-remote/:username=myusername
//packages.mycompany.com/api/npm/npm-remote/:email=myusername@mycompany.com
//packages.mycompany.com/api/npm/npm-remote/:always-auth=true
16 replies
DDeno
Created by Meep on 9/27/2024 in #help
JXS/TSX Transformation from within browser code?
alternatively, you could use esbuild-wasm and try to do something similar to the "try" part of the esbuild docs has? https://github.com/evanw/esbuild/blob/main/scripts/try.html https://esbuild.github.io/try/
4 replies
DDeno
Created by Meep on 9/27/2024 in #help
JXS/TSX Transformation from within browser code?
sorry for reviving an old thread. i'm not sure if this works in the browser (and jsr isn't sure either) but does this somehow work? https://jsr.io/@deno/emit
4 replies
DDeno
Created by Dre on 9/25/2024 in #help
local modules
i don't think you can get the package.json exports to map out, but if you use the --unstable-sloppy-imports flag, it will find the appropriate index.* file if you just do this:
{
"foo-module": "./local_modules/foo-module/"
}
{
"foo-module": "./local_modules/foo-module/"
}
4 replies
DDeno
Created by Dre on 9/25/2024 in #help
local modules
this should work?
{
"styled-components": "npm:styled-components@5.3.11",
"moduleX": "./local_modules/moduleX/<entry-file>.<extension>"
}
{
"styled-components": "npm:styled-components@5.3.11",
"moduleX": "./local_modules/moduleX/<entry-file>.<extension>"
}
i.e.
{
"styled-components": "npm:styled-components@5.3.11",
"foo-module": "./local_modules/foo-module/index.ts"
}
{
"styled-components": "npm:styled-components@5.3.11",
"foo-module": "./local_modules/foo-module/index.ts"
}
4 replies