无法为项目运行nodemon

时间:2019-10-10 05:58:44

标签: node.js nodemon bunyan

我正在尝试运行由先前开发人员提供的开发设置。我在Windows机器上 我正在运行的命令是npm run dev并得到以下错误。

不确定为什么,但是尝试了各种步骤,例如the solution fo . is not a recognised command,而将其设置为clearing the cache and again trying to start the project

下面是package.json

{
  "name": "XXXXXXXXX",
  "version": "1.0.0",
  "description": "XXXXXXXXXX",
  "main": "index.js",
  "engines": {
    "node": ">=6.9"
  },
  "scripts": {
    "dev": "set PORT=3000 nodemon -w src --exec \"babel-node src --presets es2015\" | ./node_modules/.bin/bunyan",
    "build": "babel src -d dist --presets es2015",
    "start": "node dist",
    "prestart": "npm run -s build",
    "lint": "./node_modules/.bin/eslint src"
  },
  "eslintConfig": {
    "plugins": [],
    "extends": "eslint:recommended",
    "parserOptions": {
      "ecmaVersion": 7,
      "sourceType": "module"
    },
    "env": {
      "node": true,
      "mocha": true
    },
    "globals": {
      "Promise": true
    },
    "rules": {
      "no-console": 0,
      "no-unused-vars": 1
    }
  },
  "dependencies": {
    "bluebird": "^3.4.1",
    "body-parser": "^1.15.0",
    "config": "^1.20.1",
    "continuation-local-storage": "^3.1.7",
    "express": "^4.17.1",
    "express-list-routes": "^0.1.4",
    "express-request-id": "^1.1.0",
    "express-validation": "^0.6.0",
    "jackrabbit": "^4.3.0",
    "joi": "^8.0.5",
    "lodash": "^4.17.15",
    "tc-core-library-js": "^1.0.8"
  },
  "devDependencies": {
    "babel-cli": "^6.9.0",
    "babel-core": "^6.11.4",
    "babel-plugin-add-module-exports": "^0.2.1",
    "babel-preset-es2015": "^6.9.0",
    "bunyan": "^1.8.1",
    "eslint": "^3.2.2",
    "eslint-plugin-import": "^1.12.0"
  }
}

set PORT = 3000 nodemon -w src --exec \“ babel-node src --presets es2015 \” | ./node_modules/.bin/bunyan

set PORT=3000 nodemon -w src --exec "babel-node src --presets es2015" | './bunyan'

''.' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 255
npm ERR! tc-reproting-api@1.0.0 dev: `set PORT=3000 nodemon -w src --exec "babel-node src --presets es2015" | './bunyan'`
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the tc-reproting-api@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Appirio-14012\AppData\Roaming\npm-cache\_logs\2019-10-10T05_49_08_222Z-debug.log

这是日志文件

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\Appirio-14012\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'dev' ]
2 info using npm@6.9.0
3 info using node@v11.1.0
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle tc-reproting-api@1.0.0~predev: tc-reproting-api@1.0.0
6 info lifecycle tc-reproting-api@1.0.0~dev: tc-reproting-api@1.0.0
7 verbose lifecycle tc-reproting-api@1.0.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle tc-reproting-api@1.0.0~dev: PATH: C:\Users\Appirio-14012\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Operations\Looker\tc-reporting-api\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Symantec.cloud\PlatformAgent\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Git\cmd;C:\Program Files\PuTTY\;C:\Program Files\WinZip;C:\Users\Appirio-14012\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\Appirio-14012\AppData\Local\Programs\Python\Python37-32\Scripts\;C:\Users\Appirio-14012\AppData\Local\Programs\Python\Python37-32\;C:\Users\Appirio-14012\AppData\Local\Microsoft\WindowsApps;C:\Users\Appirio-14012\AppData\Roaming\npm;C:\Users\Appirio-14012\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\Git\cmd;C:\Program Files (x86)\Maven\apache-maven-3.6.0\bin;C:\Users\Appirio-14012\AppData\Roaming\Python\Python37\Scripts;C:\Program Files\Java\jdk1.8.0_191\bin;C:\Operations\tcs-loader;C:\Operations\Git\s3SubmissionUrl\tcs-loader;C:\Users\Appirio-14012\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\heroku\bin;C:\Users\Appirio-14012\AppData\Local\atom\bin;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;
9 verbose lifecycle tc-reproting-api@1.0.0~dev: CWD: C:\Operations\Looker\tc-reporting-api
10 silly lifecycle tc-reproting-api@1.0.0~dev: Args: [ '/d /s /c',
10 silly lifecycle   `set PORT=3000 nodemon -w src --exec "babel-node src --presets es2015" | './bunyan'` ]
11 silly lifecycle tc-reproting-api@1.0.0~dev: Returned: code: 255  signal: null
12 info lifecycle tc-reproting-api@1.0.0~dev: Failed to exec dev script
13 verbose stack Error: tc-reproting-api@1.0.0 dev: `set PORT=3000 nodemon -w src --exec "babel-node src --presets es2015" | './bunyan'`
13 verbose stack Exit status 255
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\Appirio-14012\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:182:13)
13 verbose stack     at ChildProcess.<anonymous> (C:\Users\Appirio-14012\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:182:13)
13 verbose stack     at maybeClose (internal/child_process.js:970:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:257:5)
14 verbose pkgid tc-reproting-api@1.0.0
15 verbose cwd C:\Operations\Looker\tc-reporting-api
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Appirio-14012\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
18 verbose node v11.1.0
19 verbose npm  v6.9.0
20 error code ELIFECYCLE
21 error errno 255
22 error tc-reproting-api@1.0.0 dev: `set PORT=3000 nodemon -w src --exec "babel-node src --presets es2015" | './bunyan'`
22 error Exit status 255
23 error Failed at the tc-reproting-api@1.0.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 255, true ]

0 个答案:

没有答案