You seem to not be depending on "@angular/core" and/or "rxjs". This is an error.


(Antoine OZENNE) #1

Hello,

Versions :
node -v => v8.11.3
npm -v => 6.2.0

I ran these commands :
ng new frontend
cd frontend
ng serve

Result :
You seem to not be depending on “@angular/core” and/or “rxjs”. This is an error.

I don’t understand why I get this error. The node_modules folder is not empty, I get no error during “ng new”. I also tried “npm install” before serve, but I have the same error. I tried “npm link” too, but always the same… Someone can please help me ? I just want to initialize a simple angular project.

Thank you very much !


(Christopher J Brody) #2

I gotta say this sounds like a question for the ng. For npm support I think you better post what is in package.json and how npm is invoked.


(Antoine OZENNE) #3

Hello brodybits,

My package.json contains :

{
  "name": "frontend",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^6.1.0",
    "@angular/common": "^6.1.0",
    "@angular/compiler": "^6.1.0",
    "@angular/core": "^6.1.0",
    "@angular/forms": "^6.1.0",
    "@angular/http": "^6.1.0",
    "@angular/platform-browser": "^6.1.0",
    "@angular/platform-browser-dynamic": "^6.1.0",
    "@angular/router": "^6.1.0",
    "core-js": "^2.5.4",
    "rxjs": "^6.0.0",
    "zone.js": "~0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.7.0",
    "@angular/cli": "~6.1.1",
    "@angular/compiler-cli": "^6.1.0",
    "@angular/language-service": "^6.1.0",
    "@types/jasmine": "~2.8.6",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "~4.2.1",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~1.7.1",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.0",
    "karma-jasmine": "~1.1.1",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.3.0",
    "ts-node": "~5.0.1",
    "tslint": "~5.9.1",
    "typescript": "~2.7.2"
  }
}

I don’t really directly call npm. I’m just trying to initialize an angular project with angular-cli and the three commands I wrote above. Maybe I’m not in the right place for this problem. But I don’t know where the problem comes from so I don’t know who to talk to if it’s not the npm community.

Thanks for your help !


(system) #4

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.