Node.js 部署到elastic beanstalk的部署问题;拒绝删除“;
嗨,我在尝试将新代码部署到测试环境时偶然发现了这个错误,但它突然崩溃了 在我的机器上工作正常,但在AWS上,它突然在部署时崩溃 电子商务活动日志Node.js 部署到elastic beanstalk的部署问题;拒绝删除“;,node.js,npm,amazon-elastic-beanstalk,codeship,Node.js,Npm,Amazon Elastic Beanstalk,Codeship,嗨,我在尝试将新代码部署到测试环境时偶然发现了这个错误,但它突然崩溃了 在我的机器上工作正常,但在AWS上,它突然在部署时崩溃 电子商务活动日志 npm ERR! path /tmp/deployment/application/node_modules/hummus/node_modules/.bin/node-pre-gyp npm ERR! code EEXIST npm ERR! Refusing to delete /tmp/deployment/application/n
npm ERR! path /tmp/deployment/application/node_modules/hummus/node_modules/.bin/node-pre-gyp
npm ERR! code EEXIST
npm ERR! Refusing to delete /tmp/deployment/application/node_modules/hummus/node_modules/.bin/node-pre-gyp: is outside /tmp/deployment/application/node_modules/hummus/node_modules/node-pre-gyp and not a link
npm ERR! File exists: /tmp/deployment/application/node_modules/hummus/node_modules/.bin/node-pre-gyp
624 verbose unbuild rmStuff node-pre-gyp@0.10.3 from /tmp/deployment/application/node_modules
625 verbose unbuild rmStuff in /tmp/deployment/application/node_modules/hummus/node_modules
626 silly isEverInside /tmp/deployment/application/node_modules/hummus/node_modules/.bin/node-pre-gyp is not inside /tmp/deployment/application/node_modules/hummus/node_modules/node-pre-gyp
627 silly gentlyRm parent.path = /tmp/deployment/application/node_modules/hummus/node_modules/node-pre-gyp
628 silly gentlyRm parent.managed = /tmp/deployment/application/node_modules/hummus/node_modules/node-pre-gyp is in /tmp/deployment/application
629 silly gentlyRm target.path = /tmp/deployment/application/node_modules/hummus/node_modules/.bin/node-pre-gyp
630 silly gentlyRm target.symlink = null
631 silly gentlyRm target.managed = /tmp/deployment/application/node_modules/hummus/node_modules/.bin/node-pre-gyp is in /tmp/deployment/application
632 silly gentlyRm target.inParent = false
633 verbose unlock done using /tmp/.npm/_locks/staging-6d252812679aa9c6.lock for /tmp/deployment/application/node_modules/.staging
634 verbose stack Error: Refusing to delete /tmp/deployment/application/node_modules/hummus/node_modules/.bin/node-pre-gyp: is outside /tmp/deployment/application/node_modules/hummus/node_modules/node-pre-gyp and not a link
更深入地研究它所说的日志
/tmp/.npm/_logs/2019-01-21T12_50_51_067Z-debug.log
npm ERR! path /tmp/deployment/application/node_modules/hummus/node_modules/.bin/node-pre-gyp
npm ERR! code EEXIST
npm ERR! Refusing to delete /tmp/deployment/application/node_modules/hummus/node_modules/.bin/node-pre-gyp: is outside /tmp/deployment/application/node_modules/hummus/node_modules/node-pre-gyp and not a link
npm ERR! File exists: /tmp/deployment/application/node_modules/hummus/node_modules/.bin/node-pre-gyp
624 verbose unbuild rmStuff node-pre-gyp@0.10.3 from /tmp/deployment/application/node_modules
625 verbose unbuild rmStuff in /tmp/deployment/application/node_modules/hummus/node_modules
626 silly isEverInside /tmp/deployment/application/node_modules/hummus/node_modules/.bin/node-pre-gyp is not inside /tmp/deployment/application/node_modules/hummus/node_modules/node-pre-gyp
627 silly gentlyRm parent.path = /tmp/deployment/application/node_modules/hummus/node_modules/node-pre-gyp
628 silly gentlyRm parent.managed = /tmp/deployment/application/node_modules/hummus/node_modules/node-pre-gyp is in /tmp/deployment/application
629 silly gentlyRm target.path = /tmp/deployment/application/node_modules/hummus/node_modules/.bin/node-pre-gyp
630 silly gentlyRm target.symlink = null
631 silly gentlyRm target.managed = /tmp/deployment/application/node_modules/hummus/node_modules/.bin/node-pre-gyp is in /tmp/deployment/application
632 silly gentlyRm target.inParent = false
633 verbose unlock done using /tmp/.npm/_locks/staging-6d252812679aa9c6.lock for /tmp/deployment/application/node_modules/.staging
634 verbose stack Error: Refusing to delete /tmp/deployment/application/node_modules/hummus/node_modules/.bin/node-pre-gyp: is outside /tmp/deployment/application/node_modules/hummus/node_modules/node-pre-gyp and not a link
我让CodeShip部署所有代码,它将节点单元模块打包并上传到AWS
但现在,当我尝试执行一个$eb deploy DEV-APP--profile DEV
时,它工作得很好
> hummus@1.0.95 install /tmp/deployment/application/node_modules/hummus
> node-pre-gyp install --fallback-to-build $EXTRA_NODE_PRE_GYP_FLAGS
node-pre-gyp WARN Using request for node-pre-gyp https download
[hummus] Success: "/tmp/deployment/application/node_modules/hummus/binding/hummus.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
只有当我让CodeShip进行部署时,它才完全不起作用。好的,所以我得出结论,我自己的部署没有向CodeShip添加的S3存储桶中添加节点模块
因此,在部署到elastic beanstalk之前,我刚刚添加了一个部署脚本来删除node_模块