Crash when extension watchlist specified in package.json
See original GitHub issuenodemon -v: 2.0.2node -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
- Add
extarray (with some extensions) tonodemonConfiginpackage.json. Here’s an example, taken straight from mypackage.json:
"nodemonConfig": {
"ignore": [
"sessions/*"
],
"ext": [
"js",
"scss",
"hbs"
],
"verbose": "true"
}
- 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:
- Created 4 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

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