a11ywatch / rust-to-npm

Rust to npm
https://crates.io/crates/rust-to-npm
MIT License
32 stars 4 forks source link

Publish Public Scoped Package? #12

Closed JimLynchCodes closed 1 year ago

JimLynchCodes commented 1 year ago

Hi, I would like to deploy a package named "@jimlynchcodes/01-hello-world-rs", and I'm trying to do it with this command:

rust-to-npm-cli deploy -b -n @jimlynchcodes/01-hello-world-rs

When I do this though npm and cargo seem to think I am trying to public a private package. They both fail with these errors:

error: failed to publish to registry at https://crates.io

Caused by:
  the remote server responded with an error: this crate exists but you don't seem to be an owner. If you believe this is a mistake, perhaps you need to accept an invitation to be an owner before publishing.
Deploying to npm...
npm notice 
npm notice 📦  @jimlynchcodes/hello-world-rs@0.0.3
npm notice === Tarball Contents === 
npm notice 1.2kB pre-install.js
npm notice 628B  start.js      
npm notice 1.1kB uninstall.js  
npm notice 895B  package.json  
npm notice 1.9kB README.md     
npm notice === Tarball Details === 
npm notice name:          @jimlynchcodes/hello-world-rs           
npm notice version:       0.0.3                                   
npm notice package size:  2.3 kB                                  
npm notice unpacked size: 5.7 kB                                  
npm notice shasum:        973d3b5daf4c27fa03145635d757ac05deaf1402
npm notice integrity:     sha512-NJCoKUPcdl1jd[...]yRrDtIj9WZ6OA==
npm notice total files:   5                                       
npm notice 
npm ERR! code E402
npm ERR! 402 Payment Required - PUT https://registry.npmjs.org/@jimlynchcodes%2fhello-world-rs - You must sign up for private packages

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/jim/.npm/_logs/2023-06-03T15_58_59_736Z-debug.log

I found this stack overflow post with answers on how to force it to deploy as a public package, but I'm not sure how to pass this along to "rust-to-npm" 🤔

I tried adding private = "false" into the Cargo.toml but it doesn't seem to have an effect on the build...

thanks!

j-mendez commented 1 year ago

@JimLynchCodes thank you for the issue. Going to make an update to allow all packages to deploy public unless publish = false is specified in the cargo config.

j-mendez commented 1 year ago

@JimLynchCodes fix released in v0.4.13 https://github.com/a11ywatch/rust-to-npm/commit/258e20ad7bbfef289cdba6293966c3223ea09462. Thanks again!