skip to Main Content
npm ERR! Missing script: "start"
npm ERR! 
npm ERR! Did you mean one of these?
npm ERR!     npm star # Mark your favorite packages
npm ERR!     npm stars # View packages marked as favorites
npm ERR! 
npm ERR! To see a list of scripts, run:
npm ERR!   npm run

npm ERR! A complete log of this run can be found in: /Users/nishayadav/.npm/_logs/2023-10-04T04_39_09_845Z-debug-0.log

If I use npm run start then it is giving error –

Compiled with problems:
×
ERROR in ./src/logo.svg
Module build failed (from ./node_modules/@svgr/webpack/lib/index.js):
Error: EACCES: permission denied, open '/Users/nishayadav/.config/svgrrc'

How to solve this??

2

Answers


  1. The first error "npm ERR! Missing script: "start"" indicates that there is no "start" script defined in your package.json file. To solve this, you can either add a "start" script in your package.json file or use an existing script that serves as an entry point for your application.

    To add a "start" script, open your package.json file and add the following code in the "scripts" section (code block 1 below):

    Replace "your-entry-file.js" with the filename of your entry point file (e.g., "index.js" or "app.js").

    If you already have a script that serves as the entry point for your application, you can use that script instead of "start" when running your app. For example, if your entry point script is called "server.js", you can run your app using (code block 2 below):

    Regarding the second error "Error: EACCES: permission denied, open ‘/Users/nishayadav/.config/svgrrc’", it seems to be related to permission issues when trying to open the ‘/Users/nishayadav/.config/svgrrc’ file. To solve this, you can try the following steps:

    1. Make sure you are running the command as a user with sufficient permissions. If you are on macOS or Linux, you can try running the command with sudo:

    (see code block 3 below)

    This will run the command with administrator privileges.

    1. If running with sudo doesn’t work or is not recommended, you can try changing the ownership of the ‘/Users/nishayadav/.config/svgrrc’ file to your current user. Use the chown command to achieve this:

    (see last code block below)

    Replace "your-username" with your actual username.

    By following these steps, you should be able to solve the missing "start" script error and also fix the permission issue related to the ‘/Users/nishayadav/.config/svgrrc’ file.

    1. <!-- begin snippet: js hide: false console: true babel: false -->
    Login or Signup to reply.
  2. Addressing your issues step by step :

    1. Missing your start script.
      In your package.json :

      { "scripts": { "start": "your-start-command" } }

    replace it with your start command.

    1. Permission Denied

    Check your permissions (you may need to use chmod).

    Run npm using a sudo command.

    Fix Ownership :
    sudo chown -R your_username /Users/nishayadav/.config

    Delete temporary files

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search