-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Labels
status: will not fixInvalid (untrue/unsound/erroneous), inconsistent with product, not on roadmap.Invalid (untrue/unsound/erroneous), inconsistent with product, not on roadmap.
Description
Environment details
- OS: Ubuntu 20.04 x64
- Node.js version: v14.2.0
- npm version: 7.24.1
google-gaxversion: 2.28.0
Steps to reproduce
- Create a
serverlessNode.js project - Add the
serverless-webpackplugin to yourserverless.ymlfile and usewebpackwithbabelto package the function that will be created - Add
@google-cloud/visionas a dependency - Create a Node.js Google Function or AWS Lambda that makes use of the Google Vision API (e.g. do something similar to what is shown in this SafeSearch example)
- Attempt to build the lambda with webpack
Error
WARNING in ./node_modules/retry-request/index.js 74:21-39
Module not found: Error: Can't resolve 'request' in '/home/user/project/node_modules/retry-request'
@ ./node_modules/@google-cloud/vision/node_modules/google-gax/build/src/streamingCalls/streaming.js 22:21-45
@ ./node_modules/@google-cloud/vision/node_modules/google-gax/build/src/index.js 64:18-55
@ ./node_modules/@google-cloud/vision/build/src/helpers.js 24:12-33
@ ./node_modules/@google-cloud/vision/build/src/index.js 31:16-36
@ ./src/image-service/handler/lambdaGcloudWorker.js 38:15-46
Possible solution
Add the package request as a dependency of the project here given you've included retry-request
Workaround
Add request as a dependency of the serverless project by running npm install request --save
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status: will not fixInvalid (untrue/unsound/erroneous), inconsistent with product, not on roadmap.Invalid (untrue/unsound/erroneous), inconsistent with product, not on roadmap.