Problemas quando tento executar o npm

0

Quando tento executar sudo npm start na pasta do meu projeto para executá-lo em localhost, ele me retorna:

kallel@augustinho:~/PDIAP-master$ sudo npm start
[email protected] start /home/kallel/PDIAP-master 
nodemon bin/www --exec babel-node --presets es2015
[nodemon] 1.11.0
[nodemon] to restart at any time, enter 'rs'
[nodemon] watching: *.*
[nodemon] starting 'babel-node bin/www --presets es2015'
/usr/local/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:328
        throw e;
        ^
Error: Couldn't find preset "es2015" relative to directory "/home/kallel/PDIAP-master"
    at /usr/local/lib/node_modules/babel-cli/node_modules/babel core/lib/transformation/file/options/option-manager.js:293:19
   at Array.map (native)
   at OptionManager.resolvePresets (/usr/local/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option manager.js:275:20)
    at OptionManager.mergePresets (/usr/local/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10)
    at OptionManager.mergeOptions (/usr/local/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14)
    at OptionManager.init (/usr/local/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
    at compile (/usr/local/lib/node_modules/babel-cli/node_modules/babel-register/lib/node.js:103:45)
at loader (/usr/local/lib/node_modules/babel-cli/node_modules/babel-register/lib/node.js:144:14)
at Object.require.extensions.(anonymous function) [as .js] (/usr/local/lib/node_modules/babel-cli/node_modules/babel-register/lib/node.js:154:7) 
at Module.load (module.js:487:32)
[nodemon] app crashed - waiting for file changes before starting...'
    
por innis 22.06.2017 / 03:16

1 resposta

0

Para quem está com o mesmo problema, basta instalar localmente com o npm o pacote que está faltando com o comando sudo npm install [package-asked] .

No meu caso, eu tive que executar sudo npm install es2015 e o consequente pediu pacotes até que ele fosse resolvido.

Tenha uma boa noite. :)

    
por innis 27.06.2017 / 00:42