angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Filename differ only in case error on running angular 6 application

Open HegdeSach opened this issue 8 years ago • 11 comments

Angular update to version 6 throwing error

One of my colleague have updated angular and material versions to 6 and pushed code to the repository. I pulled those changes and did 'npm install' to upgrade angular in my branch. After successfully installing Angular cli and material and on running 'ng serve' I am getting following errors


File name '/node_modules/rxjs/observable.d.ts' differs from already included file name '/node_modules/rxjs/Observable.d.ts' only in casing.

Package.json snapshot


    "dependencies": {
    "@angular/animations": "^6.0.3",
    "@angular/cdk": "^6.2.0",
    "@angular/common": "^6.0.3",
    "@angular/compiler": "^6.0.3",
    "@angular/core": "^6.0.3",
    "@angular/flex-layout": "^6.0.0-beta.15",
    "@angular/forms": "^6.0.3",
    "@angular/http": "^6.0.3",
    "@angular/material": "^6.2.0",
    "@angular/platform-browser": "^6.0.3",
    "@angular/platform-browser-dynamic": "^6.0.3",
    "@angular/router": "^6.0.3",
    "core-js": "^2.4.1",
    "latest-version": "^3.1.0",
    "rxjs": "^6.2.0",
    "rxjs-compat": "^6.0.0-rc.0",
    "zone.js": "^0.8.19"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.6.6",
    "@angular/cli": "^6.0.8",
    "@angular/compiler-cli": "^6.0.3",
    "@angular/language-service": "^6.0.3",
    "@types/jasmine": "~2.8.3",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "^4.0.1",
    "jasmine-core": "~2.8.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~2.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "ts-node": "~4.1.0",
    "tslint": "~5.9.1",
    "typescript": "~2.7.2"
  }

Environment


Angular version: 6.0.8

tsconfig file


{
  "compileOnSave": false,
  "compilerOptions": {
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es5",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2017",
      "dom"
    ]
  }
}

Anything should be handled using tsconfig?

HegdeSach avatar Jun 08 '18 06:06 HegdeSach

That seems to be a valid TypeScript error. You might have some imports that differ only in casing that are causing those errors. It's hard to say. Can you put up a repro?

filipesilva avatar Jun 08 '18 12:06 filipesilva

I have the same problem,I think it's the Case issues, Changed to 'Observable' Where the observable is referenced, observable -->Observable like this: import { Observable } from 'rxjs/Observable';

305088020 avatar Jun 22 '18 09:06 305088020

Same issue

juanarbol avatar Aug 14 '18 03:08 juanarbol

I'm sorry, but this issue is not caused by Angular CLI.

alan-agius4 avatar Sep 03 '18 07:09 alan-agius4

Same here.can you please tell any way for resolve this

Kushanpabasara avatar Sep 12 '18 09:09 Kushanpabasara

I have the same problem,I think it's the Case issues, Changed to 'Observable' Where the observable is referenced, observable -->Observable like this: import { Observable } from 'rxjs/Observable';

This was definitely the issue for me. I just needed to change from 'observable' to 'Observable' in the import statement.

mikenap avatar Oct 08 '18 13:10 mikenap

thanks

On Mon, Oct 8, 2018 at 6:38 PM mikenap [email protected] wrote:

I have the same problem,I think it's the Case issues, Changed to 'Observable' Where the observable is referenced, observable -->Observable like this: import { Observable } from 'rxjs/Observable';

This was definitely the issue for me. I just needed to change from 'observable' to 'Observable' in the import statement.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/angular/angular-cli/issues/11163#issuecomment-427824804, or mute the thread https://github.com/notifications/unsubscribe-auth/AnadzcKvkzNSwSpvcLOqcccULcEFalinks5ui05NgaJpZM4UfjwY .

--

Kushan Pabasara *Voice * : 0771584124 E-mail : kushan@trumpcode.com [email protected] *Web : *www.trumpcode.com Address : TrumpCode Pvt Ltd. 69/2, Balagala Rd, Hendala, Wattala.

Kushanpabasara avatar Oct 08 '18 15:10 Kushanpabasara

I also faced that issue. It can fixed by ensure that there are no more reference of old name in other files. Suppose 'observable' changed to 'Observable' and 'observable' was being used in other files. Then vscode doesn't rename instead throws an error of casing. So you have to manually rename it everywhere to avoid that error

ahmadtofeeq avatar Apr 25 '19 06:04 ahmadtofeeq

I had the exactly same issue. I was able to resolve by correcting case. Thank you for the help.

pdhameliya avatar Jul 19 '19 21:07 pdhameliya

I just have encountered this issue. In my case, the problem was caused by:

import { RepairsPage } from ./Repairs.page;

Not sure exactly how the uppercased R got there, but once I changed it to ./repair.page the app compiled correctly.

vespina avatar Aug 25 '19 06:08 vespina

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.