1

我正在尝试启动并运行一个基本的 vue.js 工作区。但似乎我尝试的任何东西都不起作用。自己构建或使用 git repo 根本行不通。

甚至有可能让它工作吗?

复制步骤:

  1. 使用 debian、ubuntu 或更高版本创建了空白工作区,我尝试使用“node”预设
  2. 安装 node.js
  3. 安装了 vue-cli
  4. 使用 webpack 安装 vue 没有任何特别之处
  5. 安装的依赖项
  6. 运行命令或它的一些变体

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

输出:

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 ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is 
installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 
(node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 
fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: 
{"os":"linux","arch":"x64"})

up to date in 6.051s

> vueapp01@1.0.0 start /projects/vueapp01
> npm run dev


> vueapp01@1.0.0 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

但是浏览器总是显示: Das System antwortete: (111) Connection denied

我还尝试从 git 导入 repo ...我尝试了 4 或 5 ...没有任何效果

Codenvy 版本:
5.22.1

4

1 回答 1

0

对于知识转移:

得到它与 yuriy 给我的提示一起工作。

“config/index.conf”更改host:"localhost"host:"0.0.0.0"

在 condenvy 中看起来像:

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- 
于 2018-11-21T13:55:09.897 回答