Ошибка теста NPM, ошибка кода ELIFECYCLE, при попытке использовать репозиторий GitHub тематического парка - PullRequest
0 голосов
/ 03 марта 2019

Я работаю над сбором данных из API, созданного на GitHub.Я запускаю тест по запросу readme и продолжаю получать следующие ошибки:

/usr/bin/node_modules/themeparks$ npm test
> themeparks@4.7.11 test /usr/bin/node_modules/themeparks
> npm run build && node_modules/.bin/mocha dist/test.js
> themeparks@4.7.11 build /usr/bin/node_modules/themeparks
> babel lib --presets es2015,stage-0 --out-dir dist --source-maps
sh: 1: babel: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! themeparks@4.7.11 build: `babel lib --presets es2015,stage-0 --out-dir dist --source-maps
`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the themeparks@4.7.11 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/myaccount/.npm/_logs/2019-03-02T21_22_28_684Z-debug.log
npm ERR! Test failed.  See above for more details.

После установки babel (sudo npm install --save-dev @ babel / cor e @ babel / cli) вот новаявывод:

/usr/bin/node_modules/themeparks$ npm test
> themeparks@4.7.11 test /usr/bin/node_modules/themeparks
> npm run build && node_modules/.bin/mocha dist/test.js
> themeparks@4.7.11 build /usr/bin/node_modules/themeparks
> babel lib --presets es2015,stage-0 --out-dir dist --source-maps
{ Error: Cannot find module 'babel-preset-es2015' from '/usr/bin/node_modules/themeparks'
    at Function.module.exports [as sync] (/usr/bin/node_modules/themeparks/node_modules/resolve/li
b/sync.js:58:15)
    at resolveStandardizedName (/usr/bin/node_modules/themeparks/node_modules/@babel/core/lib/conf
ig/files/plugins.js:101:31)
    at resolvePreset (/usr/bin/node_modules/themeparks/node_modules/@babel/core/lib/config/files/p
lugins.js:58:10)
    at loadPreset (/usr/bin/node_modules/themeparks/node_modules/@babel/core/lib/config/files/plug
ins.js:77:20)
    at createDescriptor (/usr/bin/node_modules/themeparks/node_modules/@babel/core/lib/config/conf
ig-descriptors.js:154:9)
    at items.map (/usr/bin/node_modules/themeparks/node_modules/@babel/core/lib/config/config-desc
riptors.js:109:50)
    at Array.map (<anonymous>)
    at createDescriptors (/usr/bin/node_modules/themeparks/node_modules/@babel/core/lib/config/con
fig-descriptors.js:109:29)
    at createPresetDescriptors (/usr/bin/node_modules/themeparks/node_modules/@babel/core/lib/conf
ig/config-descriptors.js:101:10)
    at passPerPreset (/usr/bin/node_modules/themeparks/node_modules/@babel/core/lib/config/config-
descriptors.js:58:96) code: 'MODULE_NOT_FOUND' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! themeparks@4.7.11 build: `babel lib --presets es2015,stage-0 --out-dir dist --source-maps
`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the themeparks@4.7.11 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/myaccount/.npm/_logs/2019-03-02T21_37_13_905Z-debug.log
npm ERR! Test failed.  See above for more details.

Вот GitHub для API, который я пытаюсь использовать

...