Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to resolve lifecycle scripts issue?

I explain u all my process to have this error so :

  1. I create a folder for my project
  2. I open the terminal in the folder and i do the command npm init
  3. I create index.js file in the folder
  4. I do the command npm install
  5. I do the command npm run

When i do the npm run command i get this error

Lifecycle scripts included in dis_bot1@1.0.0:
  test
    echo "Error: no test specified" && exit 1

This is my package.json file

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

{
  "name": "dis_bot1",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC"
}

>Solution :

npm run needs an argument to determine which script to run.

i.e. npm run test would run the test script defined in your package.json file.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading