Azure / azure-sdk-for-js

This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/javascript/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-js.
MIT License
2.09k stars 1.21k forks source link

Module '"url"' has no exported member 'URLSearchParams' #7381

Closed VILLAN3LL3 closed 4 years ago

VILLAN3LL3 commented 4 years ago

Describe the bug After having installed the package my Angular 8 app does not compile anymore. Error message:

ERROR in node_modules/@types/node-fetch/index.d.ts(18,10): error TS2305: Module '"url"' has no exported member 'URLSearchParams'. node_modules/@types/node-fetch/index.d.ts(18,27): error TS2724: Module '"url"' has no exported member 'URL'. Did you mean 'Url'?

To Reproduce Steps to reproduce the behavior:

  1. Installing the package via npm

Expected behavior application builds.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context package.json:

"dependencies": { "@agm/core": "^1.1.0", "@angular/animations": "^8.0.0", "@angular/cdk": "^8.0.0", "@angular/common": "^8.0.0", "@angular/compiler": "^8.2.14", "@angular/core": "^8.2.14", "@angular/forms": "^8.2.14", "@angular/platform-browser": "^8.2.14", "@angular/platform-browser-dynamic": "^8.2.14", "@angular/router": "^8.2.14", "@azure/storage-blob": "^12.1.0", "@nebular/auth": "4.1.2", "@nebular/eva-icons": "4.1.2", "@nebular/security": "4.1.2", "@nebular/theme": "4.1.2", "@swimlane/ngx-charts": "^12.1.0", "bootstrap": "4.3.1", "classlist.js": "1.1.20150312", "core-js": "2.5.1", "eva-icons": "^1.1.0", "intl": "1.2.5", "ionicons": "2.0.1", "nebular-icons": "1.1.0", "ng-circle-progress": "^1.4.1", "ng2-completer": "^3.0.3", "ng2-smart-table": "^1.5.0", "ngx-image-cropper": "^3.0.1", "node-sass": "^4.12.0", "normalize.css": "6.0.0", "pace-js": "1.0.2", "roboto-fontface": "0.8.0", "rxjs": "6.5.2", "rxjs-compat": "6.3.0", "socicon": "3.0.5", "tslib": "^1.10.0", "typeface-exo": "0.0.22", "web-animations-js": "github:angular/web-animations-js#release_pr208", "zone.js": "~0.9.1" }, "devDependencies": { "@angular-devkit/build-angular": "~0.800.2", "@angular/cli": "^8.3.23", "@angular/compiler-cli": "^8.2.14", "@angular/language-service": "8.0.0", "@compodoc/compodoc": "^1.1.10", "@types/jasmine": "2.5.54", "@types/jasminewd2": "2.0.3", "@types/node": "6.0.90", "codelyzer": "^5.2.1", "conventional-changelog-cli": "1.3.4", "husky": "0.13.3", "jasmine-core": "2.6.4", "jasmine-spec-reporter": "4.1.1", "karma": "^4.4.1", "karma-chrome-launcher": "2.1.1", "karma-cli": "1.0.1", "karma-coverage-istanbul-reporter": "1.3.0", "karma-jasmine": "1.1.0", "karma-jasmine-html-reporter": "0.2.2", "npm-run-all": "4.0.2", "protractor": "^6.0.0", "rimraf": "2.6.1", "stylelint": "^11.1.1", "ts-node": "3.2.2", "tslint": "^5.7.0", "tslint-language-service": "^0.9.9", "typescript": "3.4.5" } }

jeremymeng commented 4 years ago

@JulidaRocks do you have a simplified example project demonstrating this issue, or a step-by-step instruction to reproduce the issue using a out-of-box Angular8 app from the template?

ljian3377 commented 4 years ago

You need to update your node typings. "@types/node": "^8.0.0" works fine.

VILLAN3LL3 commented 4 years ago

You need to update your node typings. "@types/node": "^8.0.0" works fine.

Thank you very much - this fixed it!