Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Invalid Version: at new SemVer #2026

Open
shirha opened this issue Jan 8, 2022 · 3 comments
Open

Uncaught TypeError: Invalid Version: at new SemVer #2026

shirha opened this issue Jan 8, 2022 · 3 comments

Comments

@shirha
Copy link

shirha commented Jan 8, 2022

I'm trying out browserify so I created a little node js code with a require('github-db').default in it then run this command.

browserify main.js -o bundle.js

but in the browser, I got "Uncaught TypeError: Invalid Version: at new SemVer" but I don't really know how to proceed. The program works in node. I'm running Chrome on Windows 10. Please help.

package.json

{
  "name": "derelict",
  "version": "1.0.0",
  "description": "",
  "main": "main.js",
  "dependencies": {
    "github-db": "^1.1.3"
  },
  "devDependencies": {},
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}

package-lock.json

{
  "requires": true,
  "lockfileVersion": 1,
  "dependencies": {
    "agent-base": {
      "version": "2.1.1",
      "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz",
      "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=",
      "requires": {
        "extend": "~3.0.0",
        "semver": "~5.0.1"
      }
    },
    "ansi-styles": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz",
      "integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg="
    },
    "bluebird": {
      "version": "3.7.2",
      "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
      "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="
    },
    "chalk": {
      "version": "0.4.0",
      "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz",
      "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=",
      "requires": {
        "ansi-styles": "~1.0.0",
        "has-color": "~0.1.0",
        "strip-ansi": "~0.1.0"
      }
    },
    "debug": {
      "version": "2.6.9",
      "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
      "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
      "requires": {
        "ms": "2.0.0"
      }
    },
    "extend": {
      "version": "3.0.2",
      "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
      "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
    },
    "follow-redirects": {
      "version": "0.0.7",
      "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-0.0.7.tgz",
      "integrity": "sha1-NLkLqyqRGqNHVx2pDyK9NuzYqRk=",
      "requires": {
        "debug": "^2.2.0",
        "stream-consume": "^0.1.0"
      }
    },
    "github": {
      "version": "9.3.1",
      "resolved": "https://registry.npmjs.org/github/-/github-9.3.1.tgz",
      "integrity": "sha512-LvVb6iR8/7bqYgj0VeAtqys0t427jwIBkv/+or/ssypfIk5R1fnz4aeIEv4udPw6VFoH6vL4gi+foBoD5aazXg==",
      "requires": {
        "follow-redirects": "0.0.7",
        "https-proxy-agent": "^1.0.0",
        "mime": "^1.2.11",
        "netrc": "^0.1.4"
      }
    },
    "github-db": {
      "version": "1.1.3",
      "resolved": "https://registry.npmjs.org/github-db/-/github-db-1.1.3.tgz",
      "integrity": "sha512-Hswp9b3lrndwBh1SHVxJJGKqYF0yLwurCOeaRppYW3bVCZmowh5WDpnR2ItxgmXdJePVDPOOP6wga6hOlB+HMw==",
      "requires": {
        "bluebird": "^3.5.0",
        "chalk": "^0.4.0",
        "github": "^9.2.0",
        "merge": "^1.1.3",
        "uuid": "^3.0.0"
      }
    },
    "has-color": {
      "version": "0.1.7",
      "resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz",
      "integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8="
    },
    "https-proxy-agent": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz",
      "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=",
      "requires": {
        "agent-base": "2",
        "debug": "2",
        "extend": "3"
      }
    },
    "merge": {
      "version": "1.2.1",
      "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.1.tgz",
      "integrity": "sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ=="
    },
    "mime": {
      "version": "1.6.0",
      "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
      "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
    },
    "ms": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
      "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
    },
    "netrc": {
      "version": "0.1.4",
      "resolved": "https://registry.npmjs.org/netrc/-/netrc-0.1.4.tgz",
      "integrity": "sha1-a+lPysqNd63gqWcNxGCRTJRHJEQ="
    },
    "semver": {
      "version": "5.0.3",
      "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz",
      "integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no="
    },
    "stream-consume": {
      "version": "0.1.1",
      "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.1.tgz",
      "integrity": "sha512-tNa3hzgkjEP7XbCkbRXe1jpg+ievoa0O4SCFlMOYEscGSS4JJsckGL8swUyAa/ApGU3Ae4t6Honor4HhL+tRyg=="
    },
    "strip-ansi": {
      "version": "0.1.1",
      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz",
      "integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE="
    },
    "uuid": {
      "version": "3.4.0",
      "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
      "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
    }
  }
}

@PanagiotisDrakatos
Copy link

@shirha do you solve your issue i am facing similar problem with my code got Uncaught TypeError: Invalid Version:

@ljharb
Copy link
Member

ljharb commented Mar 31, 2023

What in main.js?

The dep github-db isn’t likely to work in the browser.

@shirha
Copy link
Author

shirha commented Mar 31, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants