1

Mi procesador, SO, versión de node y npm son:

 $ uname -p
x86_64
 $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:    20.04
Codename:   focal
 $ node -v
v10.19.0
 $ npm -v
6.14.4

Estoy intentando instalar el cliente de vue como root con el verbose para ver el detalle:

 $ sudo npm install -g @vue/cli --verbose

Y camina bien hasta que se tropieza con:

...
npm info lifecycle [email protected]~postinstall: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]

> [email protected] postinstall /usr/local/lib/node_modules/@vue/cli/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

 $

Y se sale al prompt del terminal.

Ejecuto manualmente la intalacion de core-js:

$ sudo npm i -g core-js --verbose
npm info it worked if it ends with ok
npm verb cli [ '/usr/bin/node',
npm verb cli   '/usr/bin/npm',
npm verb cli   'i',
npm verb cli   '-g',
npm verb cli   'core-js',
npm verb cli   '--verbose' ]
npm info using [email protected]
npm info using [email protected]
npm verb npm-session bb90059e6a975c40
npm http fetch GET 200 https://registry.npmjs.org/core-js 2232ms
npm http fetch GET 200 https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz 3331ms
npm timing stage:loadCurrentTree Completed in 5606ms
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 2ms
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 4ms
npm timing stage:loadIdealTree Completed in 8ms
npm timing stage:generateActionsToTake Completed in 3ms
npm verb correctMkdir /root/.npm/_locks correctMkdir not in flight; initializing
npm verb lock using /root/.npm/_locks/staging-3a08f0df5026584d.lock for /usr/local/lib/node_modules/.staging
npm timing action:extract Completed in 250ms
npm info lifecycle [email protected]~preuninstall: [email protected]
npm info lifecycle [email protected]~uninstall: [email protected]
npm verb unbuild rmStuff [email protected] from /usr/local/lib/node_modules
npm info lifecycle [email protected]~postuninstall: [email protected]
npm timing action:unbuild Completed in 3ms
npm timing action:remove Completed in 107ms
npm timing action:finalize Completed in 1ms
npm timing action:refresh-package-json Completed in 7ms
npm info lifecycle [email protected]~preinstall: [email protected]
npm timing action:preinstall Completed in 1ms
npm info linkStuff [email protected]
npm timing action:build Completed in 1ms
npm info lifecycle [email protected]~install: [email protected]
npm timing action:install Completed in 1ms
npm info lifecycle [email protected]~postinstall: [email protected]

> [email protected] postinstall /usr/local/lib/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


 $

Y falla exactamente en el mismo sitio.

En este hilo:

https://forum.vuejs.org/t/cannot-install-vue-cli-permission-error-in-require-postinstall/82017

Recomiendan hacer esta instalacion:

 $ sudo npm install -g --unsafe-perm @vue/cli

Pero creo que no es la solución óptima.

Alguna idea que me pueda sacar de este atolladero?

1 respuesta 1

2

uno de los motivos por los que sucede esto es por que en el proyecto ya existía un node_modules con algunos paquetes que no son compatibles con el nuevo core de vue 2, en mi caso lo solucione simplemente borrado la carpeta node_modules y volviendo a instalar todo.

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.