We're upgrading a bare-bone project from Angular11 to Angular14 and I'm stuck on the migration from TSLint 6.1.0 to ESLint.
The issue I'm encountering is that when I try to run
npm i -D eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser
(from this article)
or npm install --save-dev eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin
(from this guide)
or ng add @angular-eslint/schematics
(as from this issue)
the run always ends with this same error output:
npm WARN ERESOLVE overriding peer dependency npm WARN While resolving: inquirer-autocomplete-prompt@1.0.1 npm WARN Found: inquirer@7.0.3 npm WARN node_modules/@schuchard/schematics-core/node_modules/inquirer npm WARN inquirer@"7.0.3" from @schuchard/schematics-core@0.4.2 npm WARN node_modules/@schuchard/schematics-core npm WARN @schuchard/schematics-core@"^0.4.0" from @briebug/jest-schematic@5.0.0 npm WARN node_modules/@briebug/jest-schematic npm WARN npm WARN Could not resolve dependency: npm WARN peer inquirer@"^5.0.0 || ^6.0.0" from inquirer-autocomplete-prompt@1.0.1 npm WARN node_modules/@schuchard/schematics-core/node_modules/inquirer-autocomplete-prompt npm WARN inquirer-autocomplete-prompt@"1.0.1" from @schuchard/schematics-core@0.4.2 npm WARN node_modules/@schuchard/schematics-core npm WARN npm WARN Conflicting peer dependency: inquirer@6.5.2 npm WARN node_modules/inquirer npm WARN peer inquirer@"^5.0.0 || ^6.0.0" from inquirer-autocomplete-prompt@1.0.1 npm WARN node_modules/@schuchard/schematics-core/node_modules/inquirer-autocomplete-prompt npm WARN inquirer-autocomplete-prompt@"1.0.1" from @schuchard/schematics-core@0.4.2 npm WARN node_modules/@schuchard/schematics-core npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@wdio/sync@7.25.4', npm WARN EBADENGINE required: { node: '>=12.0.0 <16' }, npm WARN EBADENGINE current: { node: 'v16.15.0', npm: '8.5.5' } npm WARN EBADENGINE } npm WARN deprecated @types/keyv@4.2.0: This is a stub types definition. keyv provides its own type definitions, so you do not need this installed. npm WARN deprecated @types/easy-table@1.2.0: This is a stub types definition. easy-table provides its own type definitions, so you do not need this installed. npm WARN deprecated @types/pino-std-serializers@4.0.0: This is a stub types definition. pino-std-serializers provides its own type definitions, so you do not need this installed. npm WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs npm WARN deprecated libnpmconfig@1.2.1: This module is not used anymore. npm config is parsed by npm itself and by @npmcli/config npm WARN deprecated fastify-warning@0.2.0: This module renamed to process-warning npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin. npm WARN deprecated intl-messageformat-parser@1.8.1: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser npm WARN deprecated tslint@6.1.3: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information. npm ERR! code 1 npm ERR! path C:\Company\project\node_modules\fibers npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node build.js || nodejs build.js. npm ERR! fibers.cc npm ERR! c:\users\martina.magni\appdata\local\node-gyp\cache\16.15.0\include\node\node.h(63): fatal error C1083: Can't open inclusion file: 'v8.h': No such file or directory [C:\Company\project\node_modules\fibers\build\fibers.vcxproj] npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.3.0 npm ERR! gyp info using node@16.15.0 | win32 | x64 npm ERR! gyp info find Python using Python version 3.11.0 found at "C:\Users\user\AppData\Local\Programs\Python\Python311\python.exe" npm ERR! gyp info find VS using VS2017 (15.9.28307.2094) found at: npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools" npm ERR! gyp info find VS run with --verbose for detailed information npm ERR! gyp info spawn C:\Users\user\AppData\Local\Programs\Python\Python311\python.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'C:\Company\project\node_modules\node-gyp\gyp\gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'msvs', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Company\company\node_modules\fibers\build\config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Company\project\node_modules\node-gyp\addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\user\AppData\Local\node-gyp\Cache\16.15.0\include\node\common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=C:\Users\user\AppData\Local\node-gyp\Cache\16.15.0', npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Company\project\node_modules\node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\user\\AppData\\Local\\node-gyp\\Cache\\16.15.0\\<(target_arch)\\node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\Company\project\node_modules\fibers', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'C:\Company\project\node_modules\fibers\build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'build/binding.sln', npm ERR! gyp info spawn args '/clp:Verbosity=minimal', npm ERR! gyp info spawn args '/nologo', npm ERR! gyp info spawn args '/p:Configuration=Release;Platform=x64' npm ERR! gyp info spawn args ] npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error:
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess.onExit (C:\Company\project\node_modules\node-gyp\lib\build.js:203:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28) npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) npm ERR! gyp ERR! System Windows_NT 10.0.19044 npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Company\project\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--release" npm ERR! gyp ERR! cwd C:\Company\project\node_modules\fibers npm ERR! gyp ERR! node -v v16.15.0 npm ERR! gyp ERR! node-gyp -v v9.3.0 npm ERR! gyp ERR! not ok npm ERR! node-gyp exited with code: 1 npm ERR! Please make sure you are using a supported platform and node version. If you npm ERR! would like to compile fibers on this machine please make sure you have setup your npm ERR! build environment-- npm ERR! Windows + OS X instructions here: https://github.com/nodejs/node-gyp npm ERR! Ubuntu users please run:sudo apt-get install g++ build-essential
npm ERR! RHEL users please run:yum install gcc-c++
andyum groupinstall 'Development Tools'
npm ERR! Alpine users please run:sudo apk add python make g++
npm ERR! "nodejs" not recognized as internal or external program.
Which is the same output I get when just running npm i. I have limited understanding of how new installations work, but would it be feasible to manually install the ESLint dependency in package.json?
Thank you in advance!