question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vue-cli init not working on OSX 10.13.2

See original GitHub issue

I am using OSX version 10.13.2 NPM version 5.5.1 Node version v9.2.1 vue-cli version is 2.9.2

Very similar to these issues, but all workarounds and fixes do not work. Am I still missing anything?

https://github.com/vuejs/vue-cli/issues/681 https://github.com/vuejs-templates/webpack/issues/1168

I am running vue init webpack ? Generate project in current directory? Yes ? Project name reportui ? Project description Report UI Project ? Author kli kli@gmail.com ? Vue build standalone ? Install vue-router? Yes ? Use ESLint to lint your code? No ? Set up unit tests No ? Setup e2e tests with Nightwatch? No ? Should we run npm install for you after the project has been created? (recommended) no vue-cli · Generated “reportui”.

MacBook-Pro:reportui tor$ npm install

fsevents@1.1.3 install /Users/tor/Documents/rrr/reportui/node_modules/fsevents node install

[fsevents] Success: “/Users/tor/Documents/rrr/reportui/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node” is installed via remote

uglifyjs-webpack-plugin@0.4.6 postinstall /Users/tor/Documents/rrr/reportui/node_modules/webpack/node_modules/uglifyjs-webpack-plugin node lib/post_install.js

npm notice created a lockfile as package-lock.json. You should commit this file. added 1105 packages in 16.042s MacBook-Pro:reportui tor$ npm run dev

reportui@1.0.0 dev /Users/tor/Documents/rrr/reportui webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

10% building modules 1/1 modules 0 activeevents.js:136
throw er; // Unhandled ‘error’ event ^

Error: getaddrinfo ENOTFOUND localhost at errnoException (dns.js:55:10) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:97:26) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! reportui@1.0.0 dev: webpack-dev-server --inline --progress --config build/webpack.dev.conf.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the reportui@1.0.0 dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/tor/.npm/_logs/2017-12-20T15_24_43_537Z-debug.log

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
kaisumlicommented, Dec 21, 2017

The fix is very simple. Not everyone has 127.0.0.1 mapped to the localhost. That’s why it is not working.

Adding 127.0.0.1 localhost to /etc/hosts will fix the issue

Maybe someone in the vue community can add it to the step to step set up guide. Otherwise it drives people away from your framework.

0reactions
SSbug696commented, Sep 25, 2018

in config/index.js

host: ‘localhost’ => host: ‘127.0.0.1’

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mac OS : Install vue cli does work properly - Stack Overflow
Find the directory path to where vue-cli was installed. Mine was located here [replace username with yours] /Users/username/.npm-packages/bin ...
Read more >
Troubleshooting - Vue CLI
This document covers some common Vue CLI issues and how to resolve them. You should always follow these steps before opening a new...
Read more >
Using the Capacitor v1.1 in Vue.js app
To follow this tutorial you should have the basic fundamentals of the command line, installed Node, Capacitor, Vue.js CLI and have macOS ......
Read more >
On the way to Vue Js.. Create Your First project App ... - Medium
You can now re-issue the same commands and they will work. ... npm init -y ... Let's install the Vue cli by running...
Read more >
How To Generate a Vue.js Single Page App With the Vue CLI
To install this on macOS or Ubuntu 18.04, follow the steps in How To ... This is not a problem, because Vue CLI...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found