Error npm run dev

Hello guys i heard this issue when trying to set up my front application, please how do i resolve this

C:\Users\Femi>cd documents

C:\Users\Femi\Documents>cd coursetro-eth

C:\Users\Femi\Documents\coursetro-eth>npm run dev
npm ERR! Missing script: “dev”
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:
npm ERR! C:\Users\Femi\AppData\Local\npm-cache_logs\2021-07-01T15_04_57_682Z-debug.log

C:\Users\Femi\Documents\coursetro-eth>

you’re trying to run a script that doesnt exist, can you be more specific about what you’re trying to do exactly?

1 Like

Yeah, just like @Nova said, maybe you are trying to call a command that does not exist, so could you please show your file named package.json

Thanks for your responses Skyge

I am trying to setup the interface(localhost)

I appreciate your responses Nova

I am trying to setup the interface(localhost)

I npm run dev on my command which is support to launch my browser(localhost), but instead, it displays an error message

I type npm run dev on my command which is support to launch my browser(localhost), but instead, it displays an error message

Just like your config, you only can run npm run test, cause npm run XXX It executes scripts configured in package. json, such as:

"scripts": {
    "dev": "node build/dev-server.js",
    "build": "node build/build.js",
  },

Only with this configuration can you run, so not all projects can run dev. so if you want to run npm run dev, you need to set config for this command.

Thanks skyge it works

1 Like

Please, how do solve this error

Just like the error message, Invalid number of arguments to Solidity function, you should check the number of parameters to pass.

Thanks for your responses,

i have check the function and parameters and still i can’t figure it out, this are solidity code and the html code

solidity file


html file