Appsweet-co / npm-carbon

Copy npm packages and all their versions from one registry to another
MIT License
3 stars 2 forks source link

[FIX] 404 error copying packages from Nexus to CodeArtifact #9

Closed hydeenoble closed 1 year ago

hydeenoble commented 1 year ago

Describe the bug I am trying to use this tool to copy scoped packages existing in nexus registry to codeartifact but I keep getting 404 when it trys to reference the package on codeartifact (to get the existing versions there)

To Reproduce Steps to reproduce the behavior:

  1. Get token for codeartifact
  2. Get token for Nexus registry
  3. Run npx @appsweet-co/npm-carbon command with the following flags:
    • --src
    • --srcToken
    • --dest
    • --destToken
      1. I get the error message:
        
        [INFO] ℹ️  Getting versions from source...
        info attempt registry request try #1 at 12:52:01 PM
        http request GET http://nexus-registry//@scope/package
        http 200 http://nexus-registry//@scope/package
        [INFO] ℹ️  Getting versions from destination...
        info attempt registry request try #1 at 12:52:01 PM
        http request GET https://codeartifact-registry//@scope/package
        http 404 https://codeartifact-registry//@scope/package
        /path/to/nvm/.nvm/versions/node/v14.21.1/lib/node_modules/@appsweet-co/npm-carbon/bin/service.js:86
                    resolve(data.versions);
                                 ^

TypeError: Cannot read property 'versions' of null


**Expected behavior**
This command is supposed to copy packages from Nexus to CodeArtifact

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
 - OS: MacOS
 - Browser chrome
 - Version 1.0.12
 - Node Version: v14.21.1
dperuo commented 1 year ago

@hydeenoble - Sorry for the delay. Please upgrade to v1.0.13 and try again.

(Fixed in https://github.com/Appsweet-co/npm-carbon/commit/7065cda8e370ce10b3ea888b50f55eab40cc080b)

hydeenoble commented 1 year ago

Thanks for your response.

dperuo commented 1 year ago

@hydeenoble - I marked this issue as DONE. Please open a new issue if needed.