primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.56k stars 4.61k forks source link

Cannot find module '@angular/http' #5631

Closed alisedaghatbaf closed 6 years ago

alisedaghatbaf commented 6 years ago

If you have a PrimeNG PRO Support subscription please post your issue at;

https://pro.primefaces.org

where our team will respond within 4 business hours.

If you do not have a PrimeNG PRO Support subscription, fill-in the report below. Please note that your issue will be added to the waiting list of community issues and will be reviewed on a first-come first-serve basis, as a result, the support team is unable to guarantee a specific schedule on when it will be reviewed. Thank you for your understanding.

I'm submitting a ... (check one with "x")

[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports) Please demonstrate your case at stackblitz by using the issue template below. Issues without a test case have much less possibility to be reviewd in detail and assisted.

https://stackblitz.com/github/primefaces/primeng-issue-template

Current behavior I get the error

Cannot find module 'angular/http'

when building my angular app as follows: ./src/main/webapp/app/primeng/data/datatable/datatabledemo.module.ts:5:28 TS2307: Cannot find module @angular/http. my package.json file: { "name": "jtams", "version": "0.0.0", "description": "Description for jtams", "private": true, "license": "UNLICENSED", "cacheDirectories": [ "node_modules" ], "dependencies": { "@angular/animations": "5.2.0", "@angular/common": "5.2.0", "@angular/compiler": "5.2.0", "@angular/core": "5.2.0", "@angular/forms": "5.2.0", "@angular/platform-browser": "5.2.0", "@angular/platform-browser-dynamic": "5.2.0", "@angular/router": "5.2.0", "@ng-bootstrap/ng-bootstrap": "1.0.0", "bootstrap": "4.0.0", "chart.js": "2.7.1", "core-js": "2.4.1", "font-awesome": "^4.7.0", "fullcalendar": "3.8.2", "jquery": "3.2.1", "moment": "2.20.1", "ng-jhipster": "0.4.0", "ngx-cookie": "2.0.1", "ngx-infinite-scroll": "0.5.1", "ngx-webstorage": "2.0.1", "primeng": "^5.2.0-rc.1", "primeng-extensions": "0.0.39", "quill": "1.3.5", "reflect-metadata": "0.1.10", "rxjs": "5.5.6", "sockjs-client": "1.1.4", "swagger-ui": "2.2.10", "tether": "1.4.0", "webstomp-client": "1.0.6", "zone.js": "0.8.19" }, "devDependencies": { "@angular/cli": "1.6.6", "@angular/compiler-cli": "5.2.0", "@ngtools/webpack": "1.8.5", "@types/jasmine": "2.5.53", "@types/node": "8.0.18", "angular2-template-loader": "0.6.2", "awesome-typescript-loader": "3.2.2", "browser-sync": "2.18.13", "browser-sync-webpack-plugin": "1.2.0", "codelyzer": "4.0.1", "copy-webpack-plugin": "4.2.3", "css-loader": "0.28.4", "exports-loader": "0.6.4", "extract-text-webpack-plugin": "3.0.2", "file-loader": "1.1.5", "generator-jhipster": "4.14.3", "html-loader": "0.5.0", "html-webpack-plugin": "2.30.1", "jasmine-core": "2.7.0", "karma": "1.7.1", "karma-chrome-launcher": "2.2.0", "karma-coverage": "1.1.1", "karma-intl-shim": "1.0.3", "karma-jasmine": "1.1.0", "karma-junit-reporter": "1.2.0", "karma-notify-reporter": "1.0.1", "karma-phantomjs-launcher": "1.0.4", "karma-remap-istanbul": "0.6.0", "karma-sourcemap-loader": "0.3.7", "karma-webpack": "2.0.4", "merge-jsons-webpack-plugin": "1.0.11", "phantomjs-prebuilt": "2.1.16", "proxy-middleware": "0.15.0", "rimraf": "2.6.1", "source-map": "0.6.1", "sourcemap-istanbul-instrumenter-loader": "0.2.0", "style-loader": "0.18.2", "to-string-loader": "1.1.5", "tslint": "5.5.0", "tslint-loader": "3.5.3", "typescript": "2.6.2", "xml2js": "0.4.17", "generator-jhipster-elasticsearch-reindexer": "1.2.1", "generator-jhipster-primeng": "2.0.43", "generator-jhipster-primeng-charts": "1.0.0", "uglifyjs-webpack-plugin": "1.1.5", "webpack": "3.10.0", "webpack-dev-server": "2.9.5", "webpack-merge": "4.1.1", "webpack-notifier": "1.5.1", "webpack-visualizer-plugin": "0.1.11", "web-app-manifest-loader": "0.1.1", "workbox-webpack-plugin": "3.0.0-beta.1", "write-file-webpack-plugin": "4.1.0" }, "engines": { "node": ">=6.9.0" }, "resolutions": { "source-map": "0.6.1" }, "scripts": { "lint": "tslint --project tsconfig.json -e 'node_modules/**'", "lint:fix": "yarn run lint -- --fix", "ngc": "ngc -p tsconfig-aot.json", "cleanup": "rimraf target/{aot,www}", "clean-www": "rimraf target//www/app/{src,target/}", "start": "yarn run webpack:dev", "serve": "yarn run start", "build": "yarn run webpack:prod", "test": "yarn run lint && karma start src/test/javascript/karma.conf.js", "test:watch": "yarn test -- --watch", "webpack:dev": "yarn run webpack-dev-server -- --config webpack/webpack.dev.js --progress --inline --hot --profile --port=9060 --watch-content-base", "webpack:build:main": "yarn run webpack -- --config webpack/webpack.dev.js --progress --profile", "webpack:build": "yarn run cleanup && yarn run webpack:build:main", "webpack:prod:main": "yarn run webpack -- --config webpack/webpack.prod.js --profile", "webpack:prod": "yarn run cleanup && yarn run webpack:prod:main && yarn run clean-www", "webpack:test": "yarn run test", "webpack-dev-server": "node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js", "webpack": "node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js", "postinstall": "node node_modules/phantomjs-prebuilt/install.js" } }

Expected behavior

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior? I'm interested to use primeng UI components in my app.

Please tell us about your environment: Windows, Intellij Idea, npm, Tomcat

bpbhat77 commented 6 years ago

Can you please update correct prime ng version ? It says

"PrimeNG version: 5.6.0

cyberrranger commented 6 years ago

check your package.json for

"dependencies": {
    "@angular/http": "^5.2.9",

and module.ts

import {HttpClientModule} from "@angular/common/http";

    imports: [
        HttpClientModule,
cagataycivici commented 6 years ago

Not a PrimeNG issue.