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

Missing module @typescript-eslint #63

Closed
Martinspire opened this issue Mar 25, 2020 · 3 comments
Closed

Missing module @typescript-eslint #63

Martinspire opened this issue Mar 25, 2020 · 3 comments

Comments

@Martinspire
Copy link

I'm getting an error after running the schematic ng add @angular-eslint/schematics:

npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path D:\Projects\simulator\ui\node_modules\@typescript-eslint\experimental-utils\node_modules\eslint-scope
npm ERR! dest D:\Projects\simulator\ui\node_modules\@typescript-eslint\experimental-utils\node_modules\.eslint-scope.DELETE
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, rename 'D:\Projects\simulator\ui\node_modules\@typescript-eslint\experimental-utils\node_modules\eslint-scope' -> 'D:\Projects\simulator\ui\node_modules\@typescript-eslint\experimental-utils\node_modules\.eslint-scope.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\marti\AppData\Roaming\npm-cache\_logs\2020-03-25T09_47_26_897Z-debug.log
Package install failed, see above.

Which is probably because @typescript-eslint isn't installed. There is no reference to this in the readme either.

After running npm install -D @typescript-eslint/parser @typescript-eslint/eslint-plugin @typescript-eslint/typescript-estree it worked.

I'm not sure whether it should be part of the schematic or whether I missed something installing the project, but something is missing somewhere...

@JamesHenry
Copy link
Member

Hmm it's a good point, I was approaching it from the point of view of giving users flexibility to choose their typescript-eslint version, but we do need to address this, either through docs or changing what we install...

Open to community suggestions and solutions here!

@nmccrina-contessa
Copy link

Personally, as someone who is not geeking out over linting but just wants to set something up that works and move on, I would prefer having the schematic install the packages that @Martinspire installed.

@JamesHenry
Copy link
Member

As of v0.0.1-alpha.31, ng add @angular-eslint/schematics installs absolutely everything you need to run linting with ESLint on an Angular workspace.

Next up will be a schematic for adding ESLint configuration to an existing project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants