Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng add @angular-eslint/schematics@latest fails trying to install coffeescript@1.12.8 #839

Closed
skovalyov opened this issue Nov 23, 2020 · 6 comments
Labels
good first issue Good for newcomers; welcome aboard! status: external Not related to this repository.

Comments

@skovalyov
Copy link

🐛 Bug Report

Actual Behavior

ng add @angular-eslint/schematics@latest fails during installing packages for tooling via npm phase.

Expected Behavior

ng add @angular-eslint/schematics@latest should install all the relevant packages for migrating an Angular CLI project from Codelyzer and TSLint.

Reproduction

  1. Go to an Angular CLI project folder in a terminal.
  2. Run ng add @angular-eslint/schematics@latest.
  3. Wait before it fails with an error:
$ ng add @angular-eslint/schematics@latest
Installing packages for tooling via npm.
An unhandled exception occurred: npm ERR! code E404
npm ERR! 404 Not Found - GET http://my-local-sinopia-npm-registry/coffeescript/-/coffeescript-1.12.8.tgz
npm ERR! 404
npm ERR! 404  'coffeescript@^1.10.0' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'cson-parser'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

Apparently the error occurs because of cson-parser, which has coffeescript as a dependency, which I mentioned at #728 (comment)

Even the latest cson-parser uses "coffeescript": "^1.12.7", which results in attempt to install non-existent coffeescript@1.12.8. The problem has been earlier discussed in other repositories such as npm/registry-issue-archive#248

Environment

  • Windows 10 Enterprise.
  • Cygwin.
  • Corporate Sinopia npm registry.
@KingDarBoja KingDarBoja added status: blocked We can't make progress on this issue until something else is resolved... status: external Not related to this repository. labels Nov 23, 2020
@KingDarBoja
Copy link
Collaborator

The proper way of fixing it is to ask cson-parser maintainers to pin the coffescript version to 1.12.7 as their package.json uses a minor range semantic version

@KingDarBoja
Copy link
Collaborator

Alright, cson-parser got updated at #841, @JoshuaKGoldberg can you provide a patch release to see if this solves the issue? 👨‍🎤

@KingDarBoja KingDarBoja added good first issue Good for newcomers; welcome aboard! and removed status: blocked We can't make progress on this issue until something else is resolved... labels Nov 23, 2020
@JoshuaKGoldberg JoshuaKGoldberg self-assigned this Nov 24, 2020
@JoshuaKGoldberg
Copy link
Member

Okie dokie, thanks for pushing on this! https://www.npmjs.com/package/tslint-to-eslint-config/v/2.0.1 is released and should fix this issue. Please do post here if it's still broken!

@JoshuaKGoldberg JoshuaKGoldberg removed their assignment Nov 24, 2020
@skovalyov
Copy link
Author

Thank you for the fix! Now I simply wait for https://github.com/angular-eslint new release, which should point to the latest release of https://github.com/typescript-eslint/tslint-to-eslint-config in https://github.com/angular-eslint/angular-eslint/blob/master/packages/schematics/package.json so that I can use ng add @angular-eslint/schematics

@amit2206
Copy link

Hi All, one issue I am face same as this I am trying to update by tslint to ESLint using commant - ng add @angular-eslint/schematics
But I am getting following error -
npm WARN old lockfile
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: sdwan-ui-refactor@0.0.0
npm ERR! Found: @angular/cli@13.3.5
npm ERR! node_modules/@angular/cli
npm ERR! dev @angular/cli@"^13.2.5" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/cli@">= 12.0.0 < 13.0.0" from @angular-eslint/schematics@12.7.0
npm ERR! node_modules/@angular-eslint/schematics
npm ERR! dev @angular-eslint/schematics@"12.7.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/guest/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/guest/.npm/_logs/2022-05-18T16_16_35_620Z-debug.log

Any suggestions ?

@JoshuaKGoldberg
Copy link
Member

@amit2206 that doesn't look related to this issue. Your errors and call stack don't mention coffeescript at all. It looks like your issue is probably with the @angular/cli package.

A couple of maybe helpful suggestions:

  • Your error message mentions WARN old lockfile. Consider deleting your package-lock.json after saving a backup somewhere, then running install again.
  • When reporting an issue, include all relevant information. Without all the details it's hard to help you.
    • That includes your package.json, package-lock.json, and any log files mentioned in your error messages, such as eresolve-report.txt and ...-debug.log.

Closing and locking because this issue has been resolved for quite some time. New discussions should be filed in new issues. Cheers everyone!

@typescript-eslint typescript-eslint locked as resolved and limited conversation to collaborators May 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers; welcome aboard! status: external Not related to this repository.
Projects
None yet
Development

No branches or pull requests

4 participants