Skip to content

aws-sdk not working while creating the library in angular7. #2515

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
VivithaAlamur opened this issue Feb 4, 2019 · 10 comments
Closed

aws-sdk not working while creating the library in angular7. #2515

VivithaAlamur opened this issue Feb 4, 2019 · 10 comments
Labels
guidance Question that needs advice or information. response-requested Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.

Comments

@VivithaAlamur
Copy link

We are also facing the same issue while building the library in angular7.
our package.json file inside library::
{
"name": "common-registration",
"version": "0.0.1-5",
"peerDependencies": {
"@angular/common": "^7.2.0",
"@angular/core": "^7.2.0",
"@lodash.merge": "^4.6.1",
"@angular/http": "^7.2.0",
"@angular/router": "^7.2.0",
"rxjs": "^6.3.3",
"@angular/forms": "^7.2.0",
"@angular/material": "^7.1.1",
"ngx-toastr": "^9.1.1",
"@angular/cdk": "^7.1.1",
"ngx-auto-unsubscribe": "^2.4.1",
"aws-sdk": "^2.270.1",
"ngx-webstorage": "^3.0.0-beta.14",
"@ng-select/ng-select": "^2.14.0",
"@ngx-translate/core": "^10.0.2",
"@ngx-translate/http-loader": "^3.0.1",
"@types/node": "^8.10.26"
}
}
package.json for app

{
"name": "registration",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"prebuild:library:dev": "cross-env LIB_ENV=dev node projects/common-registration/src/lib/environment-switcher.js",
"build:library:dev": "ng build common-registration --prod",
"prebuild:library:qa": "cross-env LIB_ENV=qa node projects/common-registration/src/lib/environment-switcher.js",
"build:library:qa": "ng build common-registration --prod",
"prebuild:library:prod": "cross-env LIB_ENV=prod node projects/common-registration/src/lib/environment-switcher.js",
"build:library:prod": "ng build common-registration --prod"
},
"private": true,
"dependencies": {
"@angular/animations": "~7.2.0",
"@angular/cdk": "^7.1.1",
"@angular/common": "^7.2.0",
"@angular/compiler": "~7.2.0",
"@angular/core": "^7.2.0",
"@angular/forms": "^7.2.0",
"@angular/http": "^7.2.0",
"@angular/material": "^7.1.1",
"@angular/platform-browser": "~7.2.0",
"@angular/platform-browser-dynamic": "~7.2.0",
"@angular/router": "^7.2.0",
"@ng-select/ng-select": "^2.14.0",
"@ngx-translate/core": "^10.0.2",
"@ngx-translate/http-loader": "^3.0.1",
"aws-sdk": "^2.270.1",
"core-js": "^2.5.4",
"lodash.merge": "^4.6.1",
"ngx-auto-unsubscribe": "^2.4.1",
"ngx-toastr": "^9.1.1",
"ngx-webstorage": "^3.0.0-beta.14",
"rxjs": "^6.3.3",
"tslib": "^1.9.0",
"zone.js": "~0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.12.0",
"@angular-devkit/build-ng-packagr": "~0.12.0",
"@angular/cli": "~7.2.3",
"@angular/compiler-cli": "~7.2.0",
"@angular/language-service": "~7.2.0",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^8.10.39",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.1.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"ng-packagr": "^4.2.0",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tsickle": ">=0.34.0",
"tslib": "^1.9.0",
"tslint": "~5.11.0",
"typescript": "~3.2.2"
}
}

tsconfig.app.json
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"types": ["node"]
},
"exclude": [
"test.ts",
"**/*.spec.ts"
]
}

tsconfig.json

{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "es2015",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"types": [ "node" ],
"lib": [
"es2018",
"dom"
],
"paths": {
"common-registration": [
"dist/common-registration"
],
"common-registration/": [
"dist/common-registration/
"
]
}
}
}

Facing build error

BUILD ERROR
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 and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/acm.d.ts(132,37): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.node_modules/aws-sdk/clients/acm.d.ts(134,38): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.node_modules/aws-sdk/clients/acm.d.ts(468,32): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.node_modules/aws-sdk/clients/acm.d.ts(470,32): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.node_modules/aws-sdk/clients/apigateway.d.ts(1146,23): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/clouddirectory.d.ts(1573,38): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/cloudsearchdomain.d.ts(7,24): error TS2307: Cannot find module 'stream'.
node_modules/aws-sdk/clients/cloudsearchdomain.d.ts(42,23): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/cloudtrail.d.ts(141,28): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/codecommit.d.ts(634,29): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/codecommit.d.ts(1601,22): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/cognitoidentityserviceprovider.d.ts(2581,31): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/directconnect.d.ts(992,28): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/dms.d.ts(448,35): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.node_modules/aws-sdk/lib/dynamodb/document_client.d.ts(2,25): error TS2307: Cannot find module 'stream'.
node_modules/aws-sdk/lib/dynamodb/document_client.d.ts(93,30): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/lib/dynamodb/document_client.d.ts(274,38): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field
in your tsconfig.
node_modules/aws-sdk/clients/dynamodb.d.ts(498,38): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/dynamodbstreams.d.ts(92,38): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/ec2.d.ts(3074,23): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/ecr.d.ts(767,31): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.node_modules/aws-sdk/clients/firehose.d.ts(182,22): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/lib/services/glacier.d.ts(10,28): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/glacier.d.ts(7,24): error TS2307: Cannot find module 'stream'.
node_modules/aws-sdk/clients/glacier.d.ts(1313,24): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/iam.d.ts(1120,32): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/iam.d.ts(3118,35): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/iot.d.ts(4487,27): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/iotdata.d.ts(73,30): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/iotdata.d.ts(74,25): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/kinesis.d.ts(237,22): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/kms.d.ts(328,32): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.node_modules/aws-sdk/clients/kms.d.ts(962,31): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.node_modules/aws-sdk/clients/lambda.d.ts(7,24): error TS2307: Cannot find module 'stream'.
node_modules/aws-sdk/clients/lambda.d.ts(372,23): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/lambda.d.ts(373,28): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/lexruntime.d.ts(7,24): error TS2307: Cannot find module 'stream'.
node_modules/aws-sdk/clients/lexruntime.d.ts(35,28): error TS2580: Cannot find name 'Buffer'. Do you need to
install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/polly.d.ts(8,24): error TS2307: Cannot find module 'stream'.
node_modules/aws-sdk/clients/polly.d.ts(70,29): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/rekognition.d.ts(1135,27): error TS2580: Cannot find name 'Buffer'. Do you need
to install type definitions for node? Try npm i @types/node and then add node to the types field in your
tsconfig.
node_modules/aws-sdk/clients/ses.d.ts(1513,32): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/sns.d.ts(275,24): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.node_modules/aws-sdk/clients/sqs.d.ts(216,24): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.node_modules/aws-sdk/clients/ssm.d.ts(4954,48): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/support.d.ts(336,22): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/waf.d.ts(628,39): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.node_modules/aws-sdk/clients/wafregional.d.ts(672,39): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/lexmodelbuildingservice.d.ts(306,23): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/mobile.d.ts(106,26): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/mediastoredata.d.ts(7,24): error TS2307: Cannot find module 'stream'.
node_modules/aws-sdk/clients/mediastoredata.d.ts(199,29): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/appsync.d.ts(248,23): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/kinesisvideoarchivedmedia.d.ts(7,24): error TS2307: Cannot find module 'stream'.node_modules/aws-sdk/clients/kinesisvideoarchivedmedia.d.ts(121,25): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/kinesisvideomedia.d.ts(7,24): error TS2307: Cannot find module 'stream'.
node_modules/aws-sdk/clients/kinesisvideomedia.d.ts(53,25): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/sagemakerruntime.d.ts(24,26): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/acmpca.d.ts(283,37): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/acmpca.d.ts(285,38): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/acmpca.d.ts(353,25): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/secretsmanager.d.ts(627,34): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/iotanalytics.d.ts(1007,32): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/lib/config.d.ts(1,34): error TS2307: Cannot find module 'http'.
node_modules/aws-sdk/lib/config.d.ts(2,35): error TS2307: Cannot find module 'https'.
node_modules/aws-sdk/lib/request.d.ts(1,25): error TS2307: Cannot find module 'stream'.
node_modules/aws-sdk/lib/request.d.ts(132,45): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.node_modules/aws-sdk/lib/event-stream/event-stream.d.ts(1,55): error TS2503: Cannot find namespace 'NodeJS'.
node_modules/aws-sdk/clients/s3.d.ts(11,24): error TS2307: Cannot find module 'stream'.
node_modules/aws-sdk/clients/s3.d.ts(787,22): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/s3.d.ts(1151,42): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.node_modules/aws-sdk/clients/s3.d.ts(3347,15): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.node_modules/aws-sdk/clients/s3.d.ts(3553,32): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
Error: 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 and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/acm.d.ts(132,37): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.node_modules/aws-sdk/clients/acm.d.ts(134,38): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.node_modules/aws-sdk/clients/acm.d.ts(468,32): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.node_modules/aws-sdk/clients/acm.d.ts(470,32): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.node_modules/aws-sdk/clients/apigateway.d.ts(1146,23): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/clouddirectory.d.ts(1573,38): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/cloudsearchdomain.d.ts(7,24): error TS2307: Cannot find module 'stream'.
node_modules/aws-sdk/clients/cloudsearchdomain.d.ts(42,23): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/cloudtrail.d.ts(141,28): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/codecommit.d.ts(634,29): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/codecommit.d.ts(1601,22): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/cognitoidentityserviceprovider.d.ts(2581,31): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/directconnect.d.ts(992,28): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/dms.d.ts(448,35): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.node_modules/aws-sdk/lib/dynamodb/document_client.d.ts(2,25): error TS2307: Cannot find module 'stream'.
node_modules/aws-sdk/lib/dynamodb/document_client.d.ts(93,30): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/lib/dynamodb/document_client.d.ts(274,38): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field
in your tsconfig.
node_modules/aws-sdk/clients/dynamodb.d.ts(498,38): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/dynamodbstreams.d.ts(92,38): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/ec2.d.ts(3074,23): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/ecr.d.ts(767,31): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.node_modules/aws-sdk/clients/firehose.d.ts(182,22): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/lib/services/glacier.d.ts(10,28): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/glacier.d.ts(7,24): error TS2307: Cannot find module 'stream'.
node_modules/aws-sdk/clients/glacier.d.ts(1313,24): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/iam.d.ts(1120,32): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/iam.d.ts(3118,35): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/iot.d.ts(4487,27): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/iotdata.d.ts(73,30): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.
node_modules/aws-sdk/clients/iotdata.d.ts(74,25): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.

Originally posted by @VivithaAlamur in #1944 (comment)

@VivithaAlamur VivithaAlamur changed the title We are also facing the same issue while building the library in angular7. aws-sdk not working while creating the library in angular7. Feb 4, 2019
@klaytaybai klaytaybai added the guidance Question that needs advice or information. label Feb 4, 2019
@klaytaybai
Copy link

Hi @VivithaAlamur, It looks like those errors are all asking the same thing. Have you tried running npm i @types/node and adding node to the types field in your tsconfig? If you have, I'll work on reproducing and resolving this.

@klaytaybai klaytaybai added closing-soon This issue will automatically close in 4 days unless further comments are made. response-requested Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days. investigating Issue has been looked at and needs deep dive work by OSDS. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. guidance Question that needs advice or information. response-requested Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days. labels Feb 4, 2019
@klaytaybai
Copy link

@VivithaAlamur, one thought is that your @types/node is two major versions behind. The current version is 10.12.21. Using the caret range won't update you to major versions. If you are able to do so, could you please try updating to the newest version and see if that fixes your problem?

@klaytaybai klaytaybai added closing-soon This issue will automatically close in 4 days unless further comments are made. response-requested Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days. labels Feb 4, 2019
@VivithaAlamur
Copy link
Author

@klaytaybai i updated the "@types/node": "^10.12.21" to latest and i added "types": ["node"] in tsconfig.app.json file but the issue still exist.

{
"name": "optical-store",
"version": "8.5.1",
"peerDependencies": {
"@angular/common": "^7.2.0",
"@angular/core": "^7.2.0",
"@lodash.merge": "^4.6.1",
"@angular/http": "^7.2.0",
"@angular/router": "^7.2.0",
"rxjs": "^6.3.3",
"@angular/forms": "^7.2.0",
"ag-grid": "^17.1.1",
"ag-grid-angular": "^17.1.0",
"ngx-virtual-scroller": "^1.0.15",
"@angular/material": "^7.1.1",
"@angular/flex-layout": "^6.0.0-beta.16",
"ngx-toastr": "^9.1.1",
"@angular/cdk": "^7.1.1",
"@ngrx/store": "^7.1.0",
"@ngrx/store-devtools": "^7.1.0",
"ngx-auto-unsubscribe": "^2.4.1",
"aws-sdk": "^2.270.1",
"@ngx-translate/core": "^10.0.2",
"@ngx-translate/http-loader": "^3.0.1",
"@types/node": "^10.12.21"
}

@no-response no-response bot removed the closing-soon This issue will automatically close in 4 days unless further comments are made. label Feb 5, 2019
@VivithaAlamur
Copy link
Author

VivithaAlamur commented Feb 5, 2019

@klaytaybai for angular7 app this is working, if i am trying to creating the library using the angular cli this is not working (ng build libraryname --prod).

@hughjdavey
Copy link

I am also having this issue on Angular 7, with latest (11.9.4) version of @types/node and the "types": ["node"] declaration in tsconfig.json

@hughjdavey
Copy link

In case it helps anyone, what finally worked was putting "types": ["node"] in src/tsconfig.app.json and not tsconfig.json

@srchase srchase added closing-soon This issue will automatically close in 4 days unless further comments are made. guidance Question that needs advice or information. and removed investigating Issue has been looked at and needs deep dive work by OSDS. labels Feb 22, 2019
@srchase
Copy link
Contributor

srchase commented Feb 22, 2019

@VivithaAlamur Does @hughjdavey's suggestion resolve your issue?

@VivithaAlamur
Copy link
Author

VivithaAlamur commented Feb 24, 2019 via email

@no-response no-response bot removed the closing-soon This issue will automatically close in 4 days unless further comments are made. label Feb 24, 2019
@srchase srchase closed this as completed Feb 25, 2019
@gnaneswarkumar
Copy link

Thanks @hughjdavey I had similar issue and your suggestion resolved my issue. Thanks a ton.

@trivikr
Copy link
Member

trivikr commented Jun 18, 2019

Locking this issue as it has been resolved, and has been inactive for 4 months.

@aws aws locked as resolved and limited conversation to collaborators Jun 18, 2019
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
guidance Question that needs advice or information. response-requested Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.
Projects
None yet
Development

No branches or pull requests

6 participants