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:

 a current workaround, assuming you've got the Toolbox installed:

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 )的更多相关文章

  1. Cannot install NodeJs: /usr/bin/env: node: No such file or directory

    安装doxmate时,doxmate地址是:https://github.com/JacksonTian/doxmatenpm install doxmate -g 安装完后把错误:Cannot in ...

  2. /usr/bin/env: node: no such file or directory

    今天在安装gulp的之后,运行gulp命令出现了如下报错: /usr/bin/env: node: no such file or directory 网上找了好久,终于解决了,所以记录一下,便于下次 ...

  3. 【node错误】/usr/bin/env: node: No such file or directory

    背景 安装了node后,执行npm run xxx的命令的时候,报错,提示如下: /usr/bin/env: node: No such file or directory 步骤 1. 什么玩意,执行 ...

  4. dockercompose up build fail

    docker https://auth.docker.io/token dial tcp lookup auth.docker.io i/o timeo Error response from dae ...

  5. 安装nodejs和grunt以后出现 /usr/bin/env: node: No such file or directory

    安装完成以后需要执行此命令 sudo ln -s /usr/bin/nodejs /usr/bin/node

  6. docker jenkins 前端node项目 自动化部署异常 env: ‘node’: No such file or directory

    出现问题是docker jenkins 里面没有自动安装node导致找不到这个Node命令 解决方案:手动安装nodejs # 进入jenkins对应容器中 # docker exec -it [对应 ...

  7. 解决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 ...

  8. 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 ...

  9. docker build no such file or directory

    在我构建新的镜像的时候, 发生 了  no such file or directory 的错误.  这个错误找了半天, 没头绪, 后来灵光一现, 原来是我的文件夹名字写错了 我的目录结构是这样的 [ ...

随机推荐

  1. LeetCode--176--第二高的薪水

    问题描述: 编写一个 SQL 查询,获取 Employee 表中第二高的薪水(Salary) . +----+--------+ | Id | Salary | +----+--------+ | 1 ...

  2. 4-10 辅助方法controll_name,;SanitizeHelper; 伪元素和scss中的&, @Media; cache介绍。

    回顾知识点 1. 在application.html.erb中: <main class="<%= controller.controller_name%>"&g ...

  3. homestead 添加新站点

    homestead 添加站点的时候遇到了坑,这里记录下来,也顺便给大家一个参考. 1. 首先修改homestead.yaml文件(虽然你有可能不知道这个文件在哪,但是我也不会帮你找的.) 2. 接着修 ...

  4. pyoj61 双线DP

    传纸条(一) 时间限制:2000 ms  |  内存限制:65535 KB 难度:5   描述 小渊和小轩是好朋友也是同班同学,他们在一起总有谈不完的话题.一次素质拓展活动中,班上同学安排做成一个m行 ...

  5. OAF开发中一些LOV相关技巧 (转)

    原文地址:OAF开发中一些LOV相关技巧 在OAF开发中,LOV的使用频率是很高的,它由两部分构成一是页面上的LOV输入框(如OAMESSageLovInputBean),二是弹出的LOV模式窗口(O ...

  6. Markdown语法笔记

    1.文字和图片中怎么让图片换行? 答:在文字和图片之间加入多个空格或者直接按Tab健即可

  7. POJ 3481 splay模板

    最后撸一发splay. 之前用treap撸的,现在splay也找到感觉了,果然不同凡响,两者之间差别与精妙之处各有其精髓! 真心赞一个! POJ平衡树的题目还是比较少,只能挑之前做过的捏一捏.但是收获 ...

  8. jsp jstl标签库核心标签

    JSTL标签库介绍 JSTL标签库的使用时为了弥补html标签的不足,规范自定义标签的使用而诞生的.使用标签的目的就是不希望在jsp页面中出现java逻辑代码 全称:JSTL标签库分类 核心标签库使用 ...

  9. git HEAD游离状态问题解决

    最近在迭代一个版本的时候,出现 HEAD detached at xxx 提示,应该是我切换分支的时候,哪里没弄对.   那么可以通过如下办法解决 git checkout 05 # 先checkou ...

  10. SpringMVC(二)传值

    1.HelloController.java 通过model.addAttribute(key,value)进行传值 package zttc.itat.controller; import org. ...