首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >docker-compose with vue-cli不工作

docker-compose with vue-cli不工作
EN

Stack Overflow用户
提问于 2018-06-08 21:22:38
回答 1查看 1.8K关注 0票数 1

我尝试用vue上传我的docker-compose,每次我都收到这个错误。我认为是bashrc,但是我不知道在ebiven / vue-cli docker集线器中应该把bashrc放在哪里。

以下是您可以帮助我的信息:

错误日志:

代码语言:javascript
复制
Attaching to teste2_web_1
web_1  |
web_1  | > teste2@1.0.0 dev /code
web_1  | > node build/dev-server.js
web_1  |
web_1  | module.js:549
web_1  |     throw err;
web_1  |     ^
web_1  |
web_1  | Error: Cannot find module 'chalk'
web_1  |     at Function.Module._resolveFilename (module.js:547:15)
web_1  |     at Function.Module._load (module.js:474:25)
web_1  |     at Module.require (module.js:596:17)
web_1  |     at require (internal/module.js:11:18)
web_1  |     at Object.<anonymous> (/code/build/check-versions.js:1:75)
web_1  |     at Module._compile (module.js:652:30)
web_1  |     at Object.Module._extensions..js (module.js:663:10)
web_1  |     at Module.load (module.js:565:32)
web_1  |     at tryModuleLoad (module.js:505:12)
web_1  |     at Function.Module._load (module.js:497:3)
web_1  | npm ERR! code ELIFECYCLE
web_1  | npm ERR! errno 1
web_1  | npm ERR! teste2@1.0.0 dev: `node build/dev-server.js`
web_1  | npm ERR! Exit status 1
web_1  | npm ERR!
web_1  | npm ERR! Failed at the teste2@1.0.0 dev script.
web_1  | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
web_1  | npm WARN Local package.json exists, but node_modules missing, did you mean to install?
web_1  |
web_1  | npm ERR! A complete log of this run can be found in:
web_1  | npm ERR!     /root/.npm/_logs/2018-06-08T13_02_10_155Z-debug.log
teste2_web_1 exited with code 1

我的docker-compose:

代码语言:javascript
复制
version: '3'
services:
  web:
    image: ebiven/vue-cli
    command: npm run dev
    volumes:
      - /c/Users/Youssef/Documents/curso/teste2:/code
    ports:
      - "8080:8080"

我的文件夹:

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-07-04 20:59:59

从错误中看,您似乎还没有运行

代码语言:javascript
复制
Npm install

从您的repo根目录。我也没有在你的问题中添加的屏幕截图中看到node_modules目录。

此特定错误来自您的应用程序无法找到粉笔模块,该模块仅用于以不同颜色突出显示终端的控制台输出。

即。这不是一个关键的任务,所以它可能不是你正在处理的一个大问题。

仔细检查您的模块并再次运行npm install,它可能会正常工作!

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50761605

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档