Read the statement by Michael Teeuw here.
npm ERR! missing script: start
-
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 definedI’m done. Who can help me ?
could it also be a version conflict?
my versions:$ node --version v10.20.1 $ npm --version 6.14.5Thanks in advance
so long -
@Perlchamp - Did you run
npm installinside the module folder? -
yes, of course. thank you
this did install the node_module folder in my module folder -
@Perlchamp Are you running
npm startinside 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 runnpm startin the MagicMirror folder, it would recognize the code. -
yes, of course. thank you.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login