angular / angular-cli

CLI tool for Angular
https://cli.angular.io
MIT License
26.76k stars 11.98k forks source link

Cannot read property 'request' of undefined #2501

Closed its2mc closed 8 years ago

its2mc commented 8 years ago

Please provide us with the following information:

OS?

os: linux x64 Ubuntu trusty tahr

Versions.

angular-cli: 1.0.0-beta.15 node: 6.7.0 os: linux x64

Repro steps.

ng build fails, says cannot read property 'request' of undefined package file as follows:

{ "name": "aamanager", "version": "2.1.0", "description": "Ask Ajumma Management Application Suite", "angular-cli": {}, "scripts": { "start": "ng serve", "serve": "export NODEENV=production && node run.js", "lint": "tslint \"src/*/_.ts\"", "test": "ng test", "pree2e": "webdriver-manager update", "e2e": "protractor" }, "author": "its2mc", "license": "NOT FOR OUTSIDE USE", "private": true, "dependencies": { "@angular/common": "2.0.1", "@angular/compiler": "2.0.1", "@angular/core": "2.0.1", "@angular/forms": "2.0.0", "@angular/http": "2.0.0", "@angular/platform-browser": "2.0.1", "@angular/platform-browser-dynamic": "2.0.0", "@angular/router": "3.0.0", "@angular/upgrade": "2.0.1", "@types/lodash": "^4.14.36", "angular-in-memory-web-api": "0.1.1", "angular2-scroll-glue": "^1.0.7", "async": "^1.5.2", "aws-sdk": "^2.6.5", "body-parser": "^1.15.2", "bootstrap": "^3.3.7", "chart.js": "^2.3.0", "connect-mongo": "^1.3.2", "cookie-parser": "~1.3.5", "core-js": "^2.4.1", "csv-parse": "^1.1.7", "debug": "~2.2.0", "es6-shim": "^0.35.0", "express": "^4.14.0", "express-favicon": "^2.0.0", "express-session": "^1.14.0", "express-winston": "^2.0.0", "file-droppa": "^1.0.0", "hbs": "^3.1.1", "helmet": "^2.3.0", "highcharts": "^4.2.7", "kerberos": "0.0.21", "lodash": "^4.16.2", "mongodb": "^2.2.10", "mongoose": "^4.6.1", "morgan": "~1.6.1", "multer": "^1.2.0", "newrelic": "^1.30.4", "ng2-charts": "1.2.0", "reflect-metadata": "^0.1.8", "rx-dom": "^7.0.3", "rxjs": "5.0.0-beta.12", "stripe": "^4.11.0", "systemjs": "0.19.39", "ts-helpers": "^1.1.1", "typings": "^1.4.0", "winston": "^2.2.0", "zone.js": "^0.6.23" }, "devDependencies": { "@types/jasmine": "^2.2.30", "angular-cli": "1.0.0-beta.15", "codelyzer": "~0.0.26", "jasmine-core": "2.4.1", "jasmine-spec-reporter": "2.5.0", "karma": "1.2.0", "karma-chrome-launcher": "^2.0.0", "karma-cli": "^1.0.1", "karma-jasmine": "^1.0.2", "karma-remap-istanbul": "^0.2.1", "protractor": "4.0.5", "ts-node": "1.2.1", "tslint": "3.13.0", "typings": "^1.4.0", "typescript": "2.0.2" } }

The log given by the failure.

result of ng build is

{ "name": "aamanager", "version": "2.1.0", "description": "Ask Ajumma Management Application Suite", "angular-cli": {}, "scripts": { "start": "ng serve", "serve": "export NODEENV=production && node run.js", "lint": "tslint \"src/*/_.ts\"", "test": "ng test", "pree2e": "webdriver-manager update", "e2e": "protractor" }, "author": "its2mc", "license": "NOT FOR OUTSIDE USE", "private": true, "dependencies": { "@angular/common": "2.0.1", "@angular/compiler": "2.0.1", "@angular/core": "2.0.1", "@angular/forms": "2.0.0", "@angular/http": "2.0.0", "@angular/platform-browser": "2.0.1", "@angular/platform-browser-dynamic": "2.0.0", "@angular/router": "3.0.0", "@angular/upgrade": "2.0.1", "@types/lodash": "^4.14.36", "angular-in-memory-web-api": "0.1.1", "angular2-scroll-glue": "^1.0.7", "async": "^1.5.2", "aws-sdk": "^2.6.5", "body-parser": "^1.15.2", "bootstrap": "^3.3.7", "chart.js": "^2.3.0", "connect-mongo": "^1.3.2", "cookie-parser": "~1.3.5", "core-js": "^2.4.1", "csv-parse": "^1.1.7", "debug": "~2.2.0", "es6-shim": "^0.35.0", "express": "^4.14.0", "express-favicon": "^2.0.0", "express-session": "^1.14.0", "express-winston": "^2.0.0", "file-droppa": "^1.0.0", "hbs": "^3.1.1", "helmet": "^2.3.0", "highcharts": "^4.2.7", "kerberos": "0.0.21", "lodash": "^4.16.2", "mongodb": "^2.2.10", "mongoose": "^4.6.1", "morgan": "~1.6.1", "multer": "^1.2.0", "newrelic": "^1.30.4", "ng2-charts": "1.2.0", "reflect-metadata": "^0.1.8", "rx-dom": "^7.0.3", "rxjs": "5.0.0-beta.12", "stripe": "^4.11.0", "systemjs": "0.19.39", "ts-helpers": "^1.1.1", "typings": "^1.4.0", "winston": "^2.2.0", "zone.js": "^0.6.23" }, "devDependencies": { "@types/jasmine": "^2.2.30", "angular-cli": "1.0.0-beta.15", "codelyzer": "~0.0.26", "jasmine-core": "2.4.1", "jasmine-spec-reporter": "2.5.0", "karma": "1.2.0", "karma-chrome-launcher": "^2.0.0", "karma-cli": "^1.0.1", "karma-jasmine": "^1.0.2", "karma-remap-istanbul": "^0.2.1", "protractor": "4.0.5", "ts-node": "1.2.1", "tslint": "3.13.0", "typings": "^1.4.0", "typescript": "2.0.2" } }


Thanks! We'll be in touch soon.

its2mc commented 8 years ago

Solved, the issue was that for some reason a module I had installed used an older version of webpack and for some reason this webpack version took precedence for angular-cli as opposed to the global webpack version. hence the incompatibility.. THis should be fixed

angular-automatic-lock-bot[bot] commented 5 years ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.