Как сделать так, чтобы файл запускался со скриптами пакета. json с reactjs? - PullRequest
2 голосов
/ 26 мая 2020

У меня есть папка bin, в которой есть файл initLocale:

https://gist.github.com/IchrakMansour/6664b6e6dd871616dc3eae024f5e209f#file -initlocale

Я хочу сделать его работоспособным и сделать его в пакете файлов . json:

"scripts": {
        "start": "npm run initLocale && react-scripts start",
        "build": "npm run initLocale:build && react-scripts build",
        "test": "react-scripts test",
        "eject": "react-scripts eject",
        "initLocale": "bin/initLocale start && npm run compile",
        "initLocale:build": "bin/initLocale build && npm run compile",
        "add-locale": "lingui add-locale",
        "extract": "lingui extract",
        "compile": "lingui compile"
      },

при запуске npm run start я получаю:

> bin/initLocale start && npm run compil

'bin' n’est pas reconnu en tant que comm
ou externe, un programme exécutable ou u
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! alaxbayer@0.1.0 initLocale: `bi
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the alaxbayer@0.1.0 i
npm ERR! This is probably not a problem 

npm ERR! A complete log of this run can 
npm ERR!     C:\Users\ichra\AppData\Roam
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! alaxbayer@0.1.0 start: `npm run
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the alaxbayer@0.1.0 s
npm ERR! This is probably not a problem 

npm ERR! A complete log of this run can 
npm ERR!     C:\Users\ichra\AppData\Roam
The terminal process terminated with exi

Как это исправить?

...