dockercompose up build fail (node no such file or directory packages.json )
docker构建项目遇到如下问题:

npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/lib/node_modules/iojs-bin/node_modules/iojs-darwin-x64/iojs-v3.3.0-darwin-x64/bin/iojs" "/usr/local/bin/npm" "i"
npm ERR! node v3.3.0
npm ERR! npm v3.3.3
npm ERR! path /Users/aredridel/Projects/npm/newww/node_modules/hapi/node_modules/inert/node_modules/lru-cache
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT:
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/lib/node_modules/iojs-bin/node_modules/iojs-darwin-x64/iojs-v3.3.0-darwin-x64/bin/iojs" "/usr/local/bin/npm" "i"
npm ERR! node v3.3.0
npm ERR! npm v3.3.3
npm ERR! path /Users/aredridel/Projects/npm/newww/node_modules/hapi/node_modules/inert/node_modules/lru-cache
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/Users/aredridel/Projects/npm/newww/node_modules/hapi/node_modules/inert/node_modules/lru-cache' -> '/Users/aredridel/Projects/npm/newww/node_modules/inert/node_modules/lru-cache'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /Users/aredridel/Projects/npm/newww/npm-debug.log
, rename '/Users/aredridel/Projects/npm/newww/node_modules/hapi/node_modules/inert/node_modules/lru-cache' -> '/Users/aredridel/Projects/npm/newww/node_modules/inert/node_modules/lru-cache' npm ERR! enoent This is most likely not a problem with npm itself npm ERR! enoent and is related to npm not being able to find a file. npm ERR! enoent npm ERR! Please include the following file with any support request: npm ERR! /Users/aredridel/Projects/npm/newww/npm-debug.log
solve method: the path fo source not mount volumes correctly . use kitematice and select the right path
这里的找不到packages.json 和找不到代码路径有关,主要问题在于kitematic 的版本可能无法识别 docker的compose 文件中mount路径,需要手动挂载项目路径到 volumns 下
挂载到目录后遇到 找不到express 的错误,

此时,kitematic 管理器中可以使用exec 控制台,进入路径后执行 npm install --save
other question: windows 上docker 默认 default ip 192.168.99.100,如何修改ip:
Close Kitematic
Delete the current default VM: docker-machine rm -f default
Create a new default machine docker-machine create -d virtualbox --virtualbox-hostonly-cidr "
192.168.99.1/24"
Open Kitematic and it should be using this VM.
这个方案是先停掉kitematic,然后用docker-machine删除默认的vm实例,重新创建一个vm,指定ip,然后启动kitematic,刚创建的就可以自动识别了
dockercompose up build fail (node no such file or directory packages.json )的更多相关文章
- Cannot install NodeJs: /usr/bin/env: node: No such file or directory
安装doxmate时,doxmate地址是:https://github.com/JacksonTian/doxmatenpm install doxmate -g 安装完后把错误:Cannot in ...
- /usr/bin/env: node: no such file or directory
今天在安装gulp的之后,运行gulp命令出现了如下报错: /usr/bin/env: node: no such file or directory 网上找了好久,终于解决了,所以记录一下,便于下次 ...
- 【node错误】/usr/bin/env: node: No such file or directory
背景 安装了node后,执行npm run xxx的命令的时候,报错,提示如下: /usr/bin/env: node: No such file or directory 步骤 1. 什么玩意,执行 ...
- dockercompose up build fail
docker https://auth.docker.io/token dial tcp lookup auth.docker.io i/o timeo Error response from dae ...
- 安装nodejs和grunt以后出现 /usr/bin/env: node: No such file or directory
安装完成以后需要执行此命令 sudo ln -s /usr/bin/nodejs /usr/bin/node
- docker jenkins 前端node项目 自动化部署异常 env: ‘node’: No such file or directory
出现问题是docker jenkins 里面没有自动安装node导致找不到这个Node命令 解决方案:手动安装nodejs # 进入jenkins对应容器中 # docker exec -it [对应 ...
- 解决Ubuntu16.04 fatal error: json/json.h: No such file or directory
参考博客 错误产生 安装json-c库之后,根据GitHub上面的readme文件链接到json-c库时出现以下错误: SDMBNJson.h:9:23: fatal error: json/json ...
- Docker build 安装报错, Could not open requirments file: [Errno 2] No such file or directory:'requirements.txt'
docker安装教程 https://docs.docker.com/get-started/part2/#build-the-app 相关帖子 https://stackoverflow.com/q ...
- docker build no such file or directory
在我构建新的镜像的时候, 发生 了 no such file or directory 的错误. 这个错误找了半天, 没头绪, 后来灵光一现, 原来是我的文件夹名字写错了 我的目录结构是这样的 [ ...
随机推荐
- Vue.js 渲染函数, JSX(未掌握,未学完)
渲染函数 , JSX(没完成学习) 基础: 实例属性:vm.$slots default 属性包括了所有没有被包含在具名插槽中的节点. 渲染函数: render: function(createEle ...
- python-day8-字典的内置方法
# info=['egon','male',18,180,75]### info_dic={'name':'egon','age':18,'sex':'male'} # 有对应关系 # 常用操作:优先 ...
- hdu-1850-nim
Being a Good Boy in Spring Festival Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32 ...
- POJ-1129 Channel Allocation (DFS)
Description When a radio station is broadcasting over a very large area, repeaters are used to retra ...
- Deep Belief Network简介——本质上是在做逐层无监督学习,每次学习一层网络结构再逐步加深网络
from:http://www.cnblogs.com/kemaswill/p/3266026.html 1. 多层神经网络存在的问题 常用的神经网络模型, 一般只包含输入层, 输出层和一个隐藏层: ...
- 在python中是没有NULL的,取而代之的是None,它的含义是为空
在python中是没有NULL的,取而代之的是None,它的含义是为空
- Centos中彻底删除Mysql(rpm、yum安装的情况)
[root@data lib]# rpm -qa¦grep mysqlmysql-5.5.25-1.el6.remi.i686mysql-libs-5.5.25-1.el6.remi.i686comp ...
- kill di/dia out 1
1● di 使~ 变成 :两个,两, 2● dia 穿过,二者之间
- javascript的replace之正则表达式的浅析
在javascript中,字符串的replace方法可以指定替换某些字符串. 1.直接替换字符串 "yy/MM/dd".replace("yy","2 ...
- DevExpress v18.1新版亮点——WinForms篇(一)
用户界面套包DevExpress v18.1日前正式发布,本站将以连载的形式为大家介绍各版本新增内容.本文将介绍了DevExpress WinForms v18.1 的新功能,快来下载试用新版本! C ...