«Can't resolve 'aws-sdk'» while it not a direct dependency
Asked Answered
W

1

8

I have newrelic among dependencies. When I try to build application I get

ERROR in ./node_modules/@newrelic/native-metrics/lib/pre-build.js
Module not found: Error: Can't resolve 'aws-sdk' in …

And aws-sdk is dependency of newrelic. I may install aws-sdk as dependency of my application, but it feels wrong.

Wonderland answered 25/1, 2018 at 12:47 Comment(6)
have you got a solution?Bait
I am facing the same issue! Did you find a solution?Collocutor
Who were you, DenverCoder9? What did you see?Banerjee
npmjs.com/package/aws-sdk#in-the-browser-1Sprout
npmjs.com/package/aws-sdk#in-nodejs-1Sprout
still facing the same issue.Christabelle
N
0
const nock = require('nock');

In my case, I simply located the directory where the above code is located in node_modules and commented the code. That fix it

Notary answered 15/12, 2023 at 10:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.