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 renamenpm 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 renamenpm 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! enoentnpm 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,刚创建的就可以自动识别了



转载于:https://www.cnblogs.com/lavin/p/6852230.html

dockercompose up build fail (node no such file or directory packages.json )相关推荐

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

    现象如下: jiankunking@ubuntu:~$ cd software/plugins/elasticsearch-head/ jiankunking@ubuntu:~/software/pl ...

  2. 解决arm64安装nodejs出现Error while loading /usr/local/sbin/node: No such file or directory问题

    问题: 安装nodejs完成后,运行npm i 时,出现Error while loading /usr/local/sbin/node: No such file or directory错误提示 ...

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

    安装完成以后需要执行此命令: sudo ln -s /usr/bin/nodejs /usr/bin/node 将2个文件夹链接.

  4. 解决Module build failed: Error: no such file or directory, scandir ‘...node_modules\node-sass\vendor‘

    使用npm启动vue项目时出现以下错误: at Object.readdirSync (fs.js:785:3)     at Object.getInstalledBinaries (D:\proj ...

  5. 报错解决:fatal error: json/json.h: No such file or directory

    晚上在做编译原理作业的时候遇到了报错: ASTNodes.h:6:23: fatal error: json/json.h: No such file or directory#include < ...

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

  7. 【Tiny4412】 编译dnw源码报错 /lib/modules/2.6.32-431.el6.x86_64/build/: No such file or directory

    1. 今天编译dnw源码的时候出现如下错误: /lib/modules/2.6.32-431.el6.x86_64/build/: No such file or directory 截图如下: 2. ...

  8. Visual studio docker build no such file or directory

    在我构建新的镜像的时候, 发生 了  no such file or directory 的错误.  这个错误找了半天, 没头绪,项目结构是这样的: WebApplication1 建立在根目录下,是 ...

  9. docker build no such file or directory

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

最新文章

  1. 网站测试自动化系统—系统应该有的功能
  2. 通过sqlplus执行*.sql文件时常见的问题总结
  3. 超简单让.NET Core开发者快速拥有CI/CD的能力-Docker版本
  4. Activit系列之---Activity的生命周期
  5. iOS-最全的App上架教程
  6. 如何在通用用户权限系统中快速实现调查问卷系统
  7. 7-1 xbmc学习笔记
  8. springboot的异常处理
  9. TT畅聊物联网(一)-初识物联网
  10. Android游戏开发之小球重力感应实现
  11. Ouroboros for Mac(AE路径生长MG动画脚本)
  12. windows系统引导配置命令
  13. 小程序云开发登陆流程
  14. 架构实践全景图 | 文末赠书
  15. 投行 SQL 人的 2018 年终回顾
  16. 3dmaxs坐标轴不显示灰色显示(没有坐标轴箭头)
  17. EMC设计的四大技巧
  18. 浅谈数据库设计技巧(实例一定的数据冗余)
  19. 如何刷新本机DNS缓存(Win+Linux+OSX)
  20. 原生js封装picker地址三级联动方法

热门文章

  1. 经管资源库项目的总结笔记
  2. 4.5.2 OSPF协议与链路状态算法
  3. 安装matplotlib和cx_Freeze
  4. while循环的习题
  5. 小程序第三方框架对比 ( wepy / mpvue / taro )
  6. Java NIO系列教程(十二) Java NIO与IO
  7. PHP 实现Office word 关键词添加背景色
  8. Spring和springmvc两个容器的关系
  9. 三、查找、替换、定位
  10. Android面试知识点(转)