简体   繁体   中英

How do I link package.json with a separate file (in this case nodemon.app)

When I run npm start I keep getting this error:

'nodemon.app' is not recognized as an internal or external command,
operable program or batch file.

I have reinstalled it, added nearly everything as an environmental variable and nothing has worked. I also cannot find anything like nodemon.app in my folders.

My package.json:

{
  "name": "website",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "nodemon.app js",
    "build": "cross-env NODE_ENV=production OTHERFLAG=myValue webpack --config build/webpack.config.js"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "connect-flash": "^0.1.1",
    "cookie-parser": "^1.4.6",
    "dotenv": "^16.0.1",
    "ejs": "^3.1.8",
    "express": "^4.18.1",
    "express-ejs-layouts": "^2.5.1",
    "express-fileupload": "^1.4.0",
    "express-session": "^1.17.3",
    "mongodb": "^4.8.0",
    "mongoose": "^6.4.6"
  },
  "devDependencies": {
    "nodemon": "^2.0.19"
  }
}

Apologies Guys, turns out I had the wrong filename in my package.json , so it errored.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM