3.0.0-rc.3
https://github.com/jaromero/vue-cli-service-error-demo
vue create my-appcd my-app && yarn run serve (or npm if chosen)npx vue-cli-service serveNo errors; vue-cli-service should run as expected.
When vue-cli-service is run with npx, the output is simply:
Cannot read property 'replace' of null
With yarn, the output is:
~~~
yarn run v1.7.0
$ vue-cli-service serve
/home/nsdragon/test/vue-cli/my-app/node_modules/hosted-git-info/index.js:73
if (!(ex instanceof URIError)) throw ex
^
TypeError: Cannot read property 'replace' of null
at /home/nsdragon/test/vue-cli/my-app/node_modules/hosted-git-info/index.js:61:63
at Array.map (
at fromUrl (/home/nsdragon/test/vue-cli/my-app/node_modules/hosted-git-info/index.js:45:39)
at Function.module.exports.fromUrl (/home/nsdragon/test/vue-cli/my-app/node_modules/hosted-git-info/index.js:32:18)
at Object.
at Array.forEach (
at Object.
at Array.forEach (
at Object.fixDependencies (/home/nsdragon/test/vue-cli/my-app/node_modules/normalize-package-data/lib/fixer.js:137:41)
at /home/nsdragon/test/vue-cli/my-app/node_modules/normalize-package-data/lib/normalize.js:32:38
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
~~~
(npm shows largely the same information, plus npm-specific info like this is not a problem with npm, debug log at /path/to/wherever/debug.log etc.)
Even with pnpm (and installing dependencies with the --shamefully-flatten flag) this fails and produces the same error as npm.
Node: 10.6.0
npm: 6.1.0
yarn: 1.7.0
I've got the same error.
Same, getting this on two different Windows computers
Looks like this was an issue with hosted-git-info, and they just merged a quick fix an hour ago.
https://github.com/npm/hosted-git-info/issues/35
Updating hosted-git-info resolved the issue for me
@chasebank Thanks, worked for me too.
We'll leave this open for a while so people with the same problem find this info more easily, but this could be closed.
Most helpful comment
Looks like this was an issue with hosted-git-info, and they just merged a quick fix an hour ago.
https://github.com/npm/hosted-git-info/issues/35
Updating hosted-git-info resolved the issue for me