1
1

Добрый день всем! Не могу установить npm на macOS 10.13.6. При запуске npm install вижу три ошибки: 

1. npm WARN old lockfile    The package-lock.json file was created with an old version of npm, so supplemental metadata must be fetched from the registry.

2. New minor version of npm available! 8.1.2 -> 8.3.1

3. Unable to authenticate, your authentication token seems to be invalid.

По ошибке 2: запустил npm install -g npm@8.3.1, вышла ошибка Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'

По ошибке 3: залогинился, прошел все аутентификации - все равно та же ошибка. 

По ошибке 1: предполагаю, что версия node js не та (в уроке с репозиторием использовалась версия 12.17.0, а у меня стоит 16.13.2). Но не уверен, и не могу понять как в этом случае откатиться назад на 12. Попытался удалить все версии node js и поставить nvm, все получилось, но при команде nvm install+версия терминал выдает ошибку: command not found. Установлены версия git 2.17.2, версия npm 8.1.2. Буду признателен за совет.

iMac-Nikolay:lastPart NikolayKovin$ npm install
npm WARN old lockfile 
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile 
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile 
npm notice 
npm notice New minor version of npm available! 8.1.2 -> 8.3.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.3.1
npm notice Run npm install -g npm@8.3.1 to update!
npm notice 
npm ERR! code E401
npm ERR! Unable to authenticate, your authentication token seems to be invalid.
npm ERR! To correct this please trying logging in again with:
npm ERR!     npm login

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/NikolayKovin/.npm/_logs/2022-01-16T11_59_32_611Z-debug.log
iMac-Nikolay:lastPart NikolayKovin$ npm install -g npm@8.3.1
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/npm
npm ERR! dest /usr/local/lib/node_modules/.npm-i9nnxROI
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm ERR!  [Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'rename',
npm ERR!   path: '/usr/local/lib/node_modules/npm',
npm ERR!   dest: '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/NikolayKovin/.npm/_logs/2022-01-16T12_00_29_341Z-debug.log
iMac-Nikolay:lastPart NikolayKovin$ npm login
npm notice Log in on https://registry.npmjs.org/
Username: nkovin
Password: 
Email: (this IS public) nkovin@gmail.com
Enter one-time password from your authenticator app: 32051140
Logged in as nkovin on https://registry.npmjs.org/.
iMac-Nikolay:lastPart NikolayKovin$ npm install
npm WARN old lockfile 
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile 
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile 
npm ERR! code E401
npm ERR! Unable to authenticate, your authentication token seems to be invalid.
npm ERR! To correct this please trying logging in again with:
npm ERR!     npm login

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/NikolayKovin/.npm/_logs/2022-01-16T12_04_39_966Z-debug.log
iMac-Nikolay:lastPart NikolayKovin$ 

Nikolay Kovin
2 years ago






Еще нет ответов