MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    npm ERR! missing script: start

    Scheduled Pinned Locked Moved Troubleshooting
    5 Posts 3 Posters 2.7k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • PerlchampP Offline
      Perlchamp
      last edited by

      as the heading says, i have a problem starting my module. npm start causes the following error:
      npm ERR! missing script: start
      here is my package.json file:

      {
        "name": "emetalcharts",
        "version": "1.0.0",
        "description": "charting commodity prices",
        "main": "emetalcharts.js",
        "private": "true",
        "scripts": {
          "test": "echo \"Error: no test specified\" && exit 1"
        },
        "repository": {
          "type": "git",
          "url": "git+https://github.com/sdetweil/SampleModule.git"
        },
        "author": "",
        "license": "MIT",
        "bugs": {
          "url": "https://github.com/sdetweil/SampleModule/issues"
        },
        "homepage": "https://github.com/sdetweil/SampleModule#readme",
        "dependencies": {
          "chart.js": "^2.5.0",
          "sqlite3": "^4.2.0"
        }
      }
      

      the following is recommended on many websites:

        "scripts": {
          "test": "echo \"Error: no test specified\" && exit 1",
          "start" : "node ."
        },
      

      this then causes the following error message :

      Module.register("emetalcharts", {
      ^
      ReferenceError: Module is not defined
      

      I’m done. Who can help me ?
      could it also be a version conflict?
      my versions:

       $ node --version
      v10.20.1
      $ npm --version
      6.14.5
      

      Thanks in advance
      so long

      bheplerB 1 Reply Last reply Reply Quote 0
      • bheplerB Offline
        bhepler Module Developer @Perlchamp
        last edited by

        @Perlchamp - Did you run npm install inside the module folder?

        1 Reply Last reply Reply Quote 0
        • PerlchampP Offline
          Perlchamp
          last edited by Perlchamp

          yes, of course. thank you
          this did install the node_module folder in my module folder

          lavolp3L 1 Reply Last reply Reply Quote 0
          • lavolp3L Offline
            lavolp3 Module Developer @Perlchamp
            last edited by lavolp3

            @Perlchamp Are you running npm start inside the module folder?
            I’m not an expert on this, but I think Module is a class that belongs to the MagicMirror environment. Your module as a standalone does not know what to do with it.
            If you run npm start in the MagicMirror folder, it would recognize the code.

            How to troubleshoot modules
            MMM-soccer v2, MMM-AVStock

            1 Reply Last reply Reply Quote 0
            • PerlchampP Offline
              Perlchamp
              last edited by

              yes, of course. thank you.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy