简体   繁体   English

nodemon 应用程序崩溃 - 在开始之前等待文件更改?

[英]nodemon app crashed - waiting for file changes before starting?

PS D:\PROGRAMMING\2077\SHOPIT> npm run dev > shopit@1.0.0 dev D:\PROGRAMMING\2077\SHOPIT > SET NODE_ENV=DEVELOPMENT& nodemon backend/server > [nodemon] 2.0.7 > [nodemon] to restart at any time, enter `rs` > [nodemon] watching path(s): *.* > [nodemon] watching extensions: js,mjs,json > [nodemon] starting `node backend/server.js` > D:\PROGRAMMING\2077\SHOPIT\backend\routes\product.js:6 > router.routes('/products').get(getProducts); ^ > TypeError: router.routes is not a function > at Object.<anonymous> (D:\PROGRAMMING\2077\SHOPIT\backend\routes\product.js:6:8) > at Module._compile (internal/modules/cjs/loader.js:1063:30) > at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) > at Module.load (internal/modules/cjs/loader.js:928:32) > at Function.Module._load (internal/modules/cjs/loader.js:769:14) > at Module.require (internal/modules/cjs/loader.js:952:19) at require >(internal/modules/cjs/helpers.js:88:18) > at Object.<anonymous> (D:\PROGRAMMING\2077\SHOPIT\backend\app.js:8:18) > at Module._compile (internal/modules/cjs/loader.js:1063:30) > at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) > [nodemon] app crashed - waiting for file changes before starting...

It says why in the error, you are trying to call something, maybe an array/object etc. instead of calling a function.它说明了为什么在错误中,您试图调用某些东西,可能是数组/对象等,而不是调用 function。

router.routes = ['/','/api','/ping'];
router.routes(); // ERROR

Check the type of router.routes查看router.routes的类型

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 “ [nodemon]应用程序崩溃-等待文件更改,然后再开始...” - '[nodemon] app crashed - waiting for file changes before starting…' nodemon,应用程序崩溃,在启动前等待文件更改 - nodemon , app crashed , waiting for file changes before starting nodemon_app 崩溃 - 在开始之前等待文件更改 - nodemon_app crashed - waiting for file changes before starting mondoDB 的 Nodemon 错误:“应用程序崩溃 - 启动前等待文件更改” - Nodemon error with mondoDB: “ app crashed - waiting for file changes before starting” React js - nodemon:应用程序崩溃 - 在启动之前等待文件更改 - React js - nodemon: app crashed - waiting for file changes before starting nodejs:nodemon应用程序崩溃-在启动前等待文件更改 - nodejs : nodemon app crashed - waiting for file changes before starting nodemon 应用程序崩溃 - 在从服务器获得响应后开始错误之前等待文件更改 - nodemon app crashed - waiting for file changes before starting error after geting response from server 节点 js 错误:[nodemon] 应用程序崩溃 - 启动前等待文件更改 - Node js error: [nodemon] app crashed - waiting for file changes before starting nodemon 应用程序崩溃 - 在启动前等待文件更改。 有人可以解决这个问题吗 - nodemon app crashed - waiting for file changes before starting. Can someone sort this out please 当我运行 nodemon 服务器时,我收到错误消息“错误的身份验证失败。[nodemon] 应用程序崩溃 - 在开始之前等待文件更改......” - When I run nodemon server I get the error "bad auth Authentication failed. [nodemon] app crashed - waiting for file changes before starting..."
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM