Vue.js and Codenvy?

314 views Asked by At

im trying to get a basic vue.js workspace up and running. But it seems that anything i tried does not work. Builting it up myself or use a git repo won't work at all.

Is it even possible get it work?

Reproduction Steps:

  1. created blank workspace with debian, ubuntu or later i tried with the "node" preset
  2. installed node.js
  3. installed vue-cli
  4. installed vue with webpack without anything special
  5. installed dependencies
  6. run the command or some variations of it

cd vueapp01 && echo -e "\nWill start at ${server.3000}\n\nInstalling packeges..." && npm install && PORT=3000 npm run start

with the output:

cd vueapp01 && echo -e "\nWill start at 
http://node21.codenvy.io:34463/\n\nInstalling packeges..." && npm install && 
PORT=3000 npm run starthttp://node21.codenvy.io:34463/

Will start at http://node21.codenvy.io:34463/

Installing packeges...
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is 
installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] 
(node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 
[email protected]: wanted {"os":"darwin","arch":"any"} (current: 
{"os":"linux","arch":"x64"})

up to date in 6.051s

> [email protected] start /projects/vueapp01
> npm run dev


> [email protected] dev /projects/vueapp01
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

DONE  Compiled successfully in 2712ms12:26:25

I  Your application is running here: http://localhost:3000

But the browser allways shows: Das System antwortete: (111) Connection refused

Also i tried to import a repo from git... i tried 4 or 5 ... nothing worked

Codenvy version:
5.22.1

1

There are 1 answers

0
Giskard On BEST ANSWER

For knowledge transfer:

Got it working with the hint that yuriy gave me.

"config/index.conf" changing host:"localhost" to host:"0.0.0.0"

In condenvy ist looks like:

module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},

// Various Dev Server settings
host: '0.0.0.0', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one 
will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver- 
watchoptions-