Не устанавливаются NPM пакеты
Всем привет! Пытаюсь установить NPM пакеты, но вылезают такие баги. Делал команды npm upgrade, npm cache , отдельно пытался установить npm i node-gyp, но все бестолку: ошибки те же. Уже вбил почти все команды.
Знаю, что надо что-то из этого обновить, но начинаю с конца обновлять, так ничего не устанавливается. Папка node modules появляется во время инстала, но после ошибок - исчезает.
$ npm i
npm WARN deprecated [email protected]: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated [email protected]: Critical bug fixed in v2.0.1, please upgrade to the latest version.
npm WARN deprecated [email protected]: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm WARN deprecated [email protected]: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated [email protected]: Please upgrade to kleur@3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
npm WARN deprecated [email protected]: flatten is deprecated in favor of utility frameworks such as lodash.
npm WARN deprecated [email protected]: This loader has been deprecated. Please use eslint-webpack-plugin
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: Please use the native JSON object instead of JSON 3
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated [email protected]: use String.prototype.padStart()
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated [email protected]: please switch to a stable version
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated [email protected]: This version of 'buffer' is out-of-date. You must update to v4.9.2 or newer
npm WARN deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated [email protected]: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c C:\Users\KOMP\AppData\Local\Temp\postinstall657856524548.cmd
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli 'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli 'C:\\Users\\KOMP\\Desktop\\ИД\\Обучение JS\\React\\Medium lvl\\Урок №2\\node_modules\\node-gyp\\bin\\node-gyp.js',
npm ERR! gyp verb cli 'rebuild',
npm ERR! gyp verb cli '--verbose',
npm ERR! gyp verb cli '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed python2 Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed python Error: not found: python
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb could not find "python". checking python launcher
npm ERR! gyp verb could not find "python". guessing location
npm ERR! gyp verb ensuring that file exists: C:\Python27\python.exe
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack at PythonFinder.failNoPython (C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\node-gyp\lib\configure.js:484:19)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\node-gyp\lib\configure.js:509:16)
npm ERR! gyp ERR! stack at C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\graceful-fs\polyfills.js:282:31
npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\KOMP\\Desktop\\ИД\\Обучение JS\\React\\Medium lvl\\Урок №2\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\Users\KOMP\Desktop\ИД\Обучение JS\React\Medium lvl\Урок №2\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.13.1
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\KOMP\AppData\Local\npm-cache\_logs\2022-07-15T03_40_32_651Z-debug-0.log
Ответы (1 шт):
Автор решения: VerZsuT
→ Ссылка
Проверь переменную окружения PATH, он не может найти в ней путь к экзешнику питона. Если пути там нет, то добавь вручную.
Чтобы переменная обновилась часто требуется перезапуск консоли