将node.js应用程序部署到heroku时出错
将node.js应用程序部署到heroku时出错 我是初学者。所以,如果你告诉我如何修复它,我很高兴 我认为夏普模块会导致错误将node.js应用程序部署到heroku时出错,node.js,heroku,Node.js,Heroku,将node.js应用程序部署到heroku时出错 我是初学者。所以,如果你告诉我如何修复它,我很高兴 我认为夏普模块会导致错误 remote: -----> Installing dependencies remote: Prebuild detected (node_modules already exists) remote: Rebuilding any native modules remote: remote: >
remote: -----> Installing dependencies
remote: Prebuild detected (node_modules already exists)
remote: Rebuilding any native modules
remote:
remote: > sharp@0.26.3 install /tmp/build_703b3ee2/node_modules/sharp
remote: > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
remote:
remote: internal/modules/cjs/loader.js:983
remote: throw err;
remote: ^
remote:
remote: Error: Cannot find module '../internal/parse-options'
remote: internal/modules/cjs/loader.js:983
remote: throw err;
remote: ^
remote:
remote: Error: Cannot find module '../internal/parse-options'
remote: gyp: Call to 'node -p "require('./lib/libvips').minimumLibvipsVersion"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
remote: gyp ERR! configure error
remote: gyp ERR! System Linux 4.4.0-1081-aws
remote: gyp ERR! command "/tmp/build_703b3ee2/.heroku/node/bin/node" "/tmp/build_703b3ee2/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
remote: gyp ERR! cwd /tmp/build_703b3ee2/node_modules/sharp
remote: gyp ERR! node -v v12.16.2
remote: gyp ERR! node-gyp -v v5.1.0
remote: gyp ERR! not ok
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! sharp@0.26.3 install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
remote: npm ERR! Exit status 1
remote: npm ERR! Failed at the sharp@0.26.3 install script.
remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
是否跟踪您的
节点\u模块/
?通常情况下不应该这样。取消跟踪、忽略、提交并重新部署。感谢您的回答,但是节点\ u模块
已被忽略;(但它是否也被提交?Git的ignore系统只会阻止跟踪。一旦提交了文件,忽略它什么也不做。如果从存储库的根目录运行Git ls files node_modules
它会给你什么?其中存在node_modules/
目录?你的node_modules/
被跟踪了吗通常不应该。取消跟踪、忽略、提交和重新部署。感谢您的回答,但是node\u modules
已被忽略;(但它也被提交了吗?Git的忽略系统只会阻止跟踪。一旦提交了文件,忽略它什么也不做。如果您从存储库的根目录运行它,node\u modules/
目录,那么Git ls files node\u modules
会给您什么?