question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crash when extension watchlist specified in package.json

See original GitHub issue
  • nodemon -v: 2.0.2
  • node -v: 13.0.1
  • Operating system/terminal environment: macOS 10.15.3 / Hyper 3.0.2
  • Using Docker? What image: NA
  • Command you ran: nodemon .

Expected behaviour

nodemon is expected to run with the given parameters I have in nodemonConfig, as specified later in the issue.

Actual behaviour

nodemon fails to start, throwing the error seen below.

Steps to reproduce

  1. Add ext array (with some extensions) to nodemonConfig in package.json. Here’s an example, taken straight from my package.json:
"nodemonConfig": {
    "ignore": [
      "sessions/*"
    ],
    "ext": [
      "js",
      "scss",
      "hbs"
    ],
    "verbose": "true"
  }
  1. Run nodemon .

If applicable, please append the --dump flag on your command and include the output here ensuring to remove any sensitive/personal details or tokens.

/Users/kjhx/Documents/Develop/express-template/node_modules/nodemon/lib/config/exec.js:205
  extension = (extension.match(/[^,*\s]+/g) || [])
                         ^

TypeError: extension.match is not a function
    at exec (/Users/kjhx/Documents/Develop/express-template/node_modules/nodemon/lib/config/exec.js:205:26)
    at mutateExecOptions (/Users/kjhx/Documents/Develop/express-template/node_modules/nodemon/lib/config/load.js:236:25)
    at /Users/kjhx/Documents/Develop/express-template/node_modules/nodemon/lib/config/load.js:86:7
    at callback (/Users/kjhx/Documents/Develop/express-template/node_modules/nodemon/lib/config/load.js:177:5)
    at /Users/kjhx/Documents/Develop/express-template/node_modules/nodemon/lib/config/load.js:230:5
    at callback (/Users/kjhx/Documents/Develop/express-template/node_modules/nodemon/lib/config/load.js:177:5)
    at /Users/kjhx/Documents/Develop/express-template/node_modules/nodemon/lib/config/load.js:217:5
    at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:61:3)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
pqvstcommented, Nov 5, 2020

It seems the extension list should be specified as a comma-separated list instead of an array. This works for me:

"ext": "js,json,md"
0reactions
albertopoljakcommented, Jul 13, 2020

Same here…

Read more comments on GitHub >

github_iconTop Results From Across the Web

NPM crashes when I try to install packages from package.json
This error occurs because the Node.js you are trying to execute is not compiled for the processor architecture of your machine.
Read more >
VMware Carbon Black EDR User Guide
Watchlist. Fully customizable searches that contain lists you can use to track specific IOCs. Watchlists are saved searches that are visible to all....
Read more >
e Veriff API documentation
Creates a session with specified verification data. Request method: POST Media type: application/json. Type: object. Headers X-AUTH-CLIENT: string (required) ...
Read more >
How to Configure Nodemon to Auto-reload Node App?
Define Multiple Extensions in nodemon Watch List. You can declare extensions of your choice in nodemon. However if you don't define any ...
Read more >
How to debug React app in VSCode - YouTube
Tips and Tricks for Debugging React Applications · The New Way To Debug JavaScript in VS Code - No Extension Required · Intro...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found