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"
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 的错误. 这个错误找了半天, 没头绪, 后来灵光一现, 原来是我的文件夹名字写错了 我的目录结构是这样的 [ ... 
随机推荐
- LeetCode--108--将有序数组转化为二叉搜索树
			问题描述: 将一个按照升序排列的有序数组,转换为一棵高度平衡二叉搜索树. 本题中,一个高度平衡二叉树是指一个二叉树每个节点 的左右两个子树的高度差的绝对值不超过 1. 示例: 给定有序数组: [-10 ... 
- LeetCode--038--报数(*)
			问题描述: 报数序列是指一个整数序列,按照其中的整数的顺序进行报数,得到下一个数.其前五项如下: 1. 1 2. 11 3. 21 4. 1211 5. 111221 1 被读作 "one ... 
- H5基础知识(一)
			一.概述 HTML5 是html4.0 升级版 结构 Html5 .样式 css3 .行为: API 都有所增强 HTML5并不仅仅只是做为HTML标记语言的一个最新版本,更重要的是它制定了Web ... 
- hdu多校2C
			题意:找多条路径覆盖所有的边,求最小路径数,要求输出路径 题解:新建一个点n+1,所有奇点向它连边,然后跑欧拉回路,最后把新加的边删去,一段连续的边就是一条路径 = =但是由于太久没写欧拉回路以及之前 ... 
- hdu2328 kmp
			Beside other services, ACM helps companies to clearly state their “corporate identity”, which includ ... 
- HDU-5050 Divided Land (二进制求GCD)
			题目大意:将两个二进制数的GCD用二进制数表示出来. 题目分析:这道题可以用java中的大数类AC. 代码如下: import java.io*; import java.math.BigIntege ... 
- quartz---的一个简单例子
			quartz---的一个简单例子 首先建立一个maven项目.jar工程即可.(提示:我前面有如何建立一个maven工程的总结以及maven环境的配置.) 1.建立好后点击到app中运行,--> ... 
- AOJ1024 Cleaning Robot 2.0
			先说一说这个OJ:貌似是11区某大学ACM的OJ,叫AIZU ONLINE JUDGE,貌似还可以看到部分犇的代码...跪跪跪 然后知道这个OJ是某场比赛安利的= = 接下来将做法: 首先我们可以发现 ... 
- 068——VUE中vuex的使用场景分析与state购物车实例
			<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ... 
- sgu108. Self-numbers 2 滚动数组 打表  难度:1
			108. Self-numbers 2 time limit per test: 0.5 sec. memory limit per test: 4096 KB In 1949 the Indian ... 
