You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR in node_modules/aws-sdk/lib/http_response.d.ts(1,25): error TS2307: Cannot find module 'stream'.
node_modules/aws-sdk/lib/http_response.d.ts(14,18): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node.
I had to follow the instruction below to fix the issue:
Adding "node" to the types array in compilerOptions is necessary and is mentioned in the documentation here. Make sure it's in the src/tsconfig.app.json file and not a different tsconfig.
Describe the bug
I was following the instructions in the following tutorial:
https://aws-amplify.github.io/docs/js/start?platform=ionic
After I ran the command 'amplify publish', I got the following error:
ERROR in node_modules/aws-sdk/lib/http_response.d.ts(1,25): error TS2307: Cannot find module 'stream'.
node_modules/aws-sdk/lib/http_response.d.ts(14,18): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try
npm i @types/node
.I had to follow the instruction below to fix the issue:
https://stackoverflow.com/questions/43017736/integrating-aws-sdk-to-angular2-gives-cannot-find-module-stream
Adding "node" to types in tsconfig.app.json file that the angular-cli creates in the src directory as below:
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "es2015",
"baseUrl": "",
"types": ["node"]
},
"exclude": [
"test.ts",
"**/*.spec.ts"
]
}
I'm using mac:
$ npm -v
6.4.1
$ node -v
v10.14.1
The text was updated successfully, but these errors were encountered: