AWS Lambda Functions - Potential cacheing error v0.20.7
See original GitHub issueRecently began seeing a new error when building sharp on a Ubuntu build server (AWS CodeBuild).
This bug is nondeterministic, sometimes the build will work and sometimes it won’t, even when no code is changed. It’s possible that the error depends on whether CodeBuild is starting from a Warm or Cold state, but I haven’t been able to track that down.
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
Arguments:
Directory: /codebuild/output/src044279047/src/packages/image-logo-generator/node_modules/sharp
Output:
ERR! sharp EEXIST: file already exists, mkdir '/root/.npm'
ERR! sharp Please see http://sharp.pixelplumbing.com/page/install
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@8.11.0 | linux | x64
gyp http GET https://nodejs.org/download/release/v8.11.0/node-v8.11.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v8.11.0/node-v8.11.0-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v8.11.0/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v8.11.0/SHASUMS256.txt
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/codebuild/output/src044279047/src/packages/image-logo-generator/node_modules/sharp/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.node-gyp/8.11.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/root/.node-gyp/8.11.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/root/.node-gyp/8.11.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/codebuild/output/src044279047/src/packages/image-logo-generator/node_modules/sharp',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory `/codebuild/output/src044279047/src/packages/image-logo-generator/node_modules/sharp/build'
TOUCH Release/obj.target/libvips-cpp.stamp
CXX(target) Release/obj.target/sharp/src/common.o
../src/common.cc:25:22: fatal error: vips/vips8: No such file or directory
#include <vips/vips8>
^
compilation terminated.
make: *** [Release/obj.target/sharp/src/common.o] Error 1
make: Leaving directory `/codebuild/output/src044279047/src/packages/image-logo-generator/node_modules/sharp/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.14.59-64.43.amzn1.x86_64
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /codebuild/output/src044279047/src/packages/image-logo-generator/node_modules/sharp
gyp ERR! node -v v8.11.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Troubleshooting Lambda configurations - AWS Documentation
For compute-intensive operations, if you experience slower-than-expected performance of your Lambda function, this may be due to your function being CPU-bound.
Read more >Troubleshoot execution issues in Lambda - AWS Documentation
Function execution errors can be caused by issues with your code, function configuration, downstream resources, or permissions. If you invoke your function ......
Read more >Best practices for working with AWS Lambda functions
Lambda purges idle connections over time. Attempting to reuse an idle connection when invoking a function will result in a connection error.
Read more >Caching data and configuration settings with AWS Lambda ...
Lambda functions use REST API calls to access the data and configuration from the cache. This can reduce latency and cost when consuming...
Read more >Troubleshoot deployment issues in Lambda
When you upload a function's deployment package from an Amazon S3 bucket, the bucket must be in the same Region as the function....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
v0.20.8 now available.
I expect to publish v0.20.8 with your fix in the next few days, thank you!