ELIFECYCLE code 2 eslint error with create-react-library - create-react-app

I would like to create a re-usable react component library and for boiler plate i came cross create-react-library - https://www.npmjs.com/package/create-react-library.
I followed the steps to create new library using npx command and it was successfully.
I have discovered that i was unable to run npm run test but if i run eslint . on command prompt it works fine so not sure if getting this error.
Code Editor: Visual Studio Code.
MacBook:testlib xx$ npm run test
> testlib#1.0.0 test /Users/xx/Documents/Repos/testlib
> run-s test:unit test:lint test:build
> testlib#1.0.0 test:unit /Users/xx/Documents/Repos/testlib
> cross-env CI=1 react-scripts test --env=jsdom
PASS src/index.test.tsx
ExampleComponent
✓ is truthy (6ms)
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 5.4s
Ran all test suites.
> testlib#1.0.0 test:lint /Users/xx/Documents/Repos/testlib
> eslint .
Oops! Something went wrong! :(
ESLint: 6.8.0.
No files matching the pattern "." were found.
Please check for typing mistakes in the pattern.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! testlib#1.0.0 test:lint: `eslint .`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the testlib#1.0.0 test:lint 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! /Users/xx/.npm/_logs/2020-08-06T10_19_00_172Z-debug.log
ERROR: "test:lint" exited with 2.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! testlib#1.0.0 test: `run-s test:unit test:lint test:build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the testlib#1.0.0 test 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! /Users/xx/.npm/_logs/2020-08-06T10_19_00_222Z-debug.log

Related

npm error: Failed at the sodium#3.0.2 preinstall script

i get:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sodium#3.0.2 preinstall: `node install.js --preinstall`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sodium#3.0.2 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
when trying to run "npm install"
why is this? i tried looking at other threads and nothing works for me.

Local package.json exists, but node_modules missing, did you mean to install?

I am trying to clone and use pix/pix in my laptop for a university project
(https://github.com/1024pix/pix). But I am getting the following error:
H:\Bachelor YGREC - Modelling & Data Science\Bachelor Year 1\Project\Project 2\pix>npm run configure
> pix#2.116.0 configure H:\Bachelor YGREC - Modelling & Data Science\Bachelor Year 1\Project\Project 2\pix
> npm install && run-s ci:all test configure:api
> pix#2.116.0 preinstall H:\Bachelor YGREC - Modelling & Data Science\Bachelor Year 1\Project\Project 2\pix
> test "$(npm --version)" = 6.13.4
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pix#2.116.0 preinstall: `test "$(npm --version)" = 6.13.4`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pix#2.116.0 preinstall 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! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-02-24T10_36_42_126Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pix#2.116.0 configure: `npm install && run-s ci:all test configure:api`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pix#2.116.0 configure 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! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-02-24T10_36_42_183Z-debug.log
You should have found the answer by now but if someone else find it useful, just run npm install in your console.
Write npm start in the terminal followed by npm install. This will solve your issue.

Problems with npm errors

I have a problem with create-react-app. When I type npm start into my console it show's multiple errors. I installed the newest version of node and webpack, and also do everything from this link.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! new-app#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the new-app#0.1.0 start 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! C:\Users\Sakuy\AppData\Roaming\npm-cache\_logs\2018-10-02T20_14_18_618Z-debug.log
Have you installed react-scripts globally?.
It might be worth checking this previous post

Npm doesn't work because of PyCharm

I have a strange error when I try to run an npm start
Here it is:
teddy#***:~/***$ npm start
> electron-quick-start#1.0.0 start /Users/teddy/***
> electron .
The file /Applications/PyCharm.app does not exist.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron-quick-start#1.0.0 start: `electron .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron-quick-start#1.0.0 start 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! /Users/teddy/.npm/_logs/2018-03-25T09_57_37_106Z-debug.log
I removed pycharm because the script launched pycharm instead of executing the command line.
Can someone help me fixing this?
Thank you

Why npm start is not working and giving the following error messages:

I have one question regarding npm. Whenever I start npm, it gives the following error:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pomodorclock#1.0.0 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pomodorclock#1.0.0 start 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?
You first need to run npm install before you can build the package. After you can use npm start.