npm run prd报错
来源:10-14 使用morgan写日志
不成大触不可熟睡
2019-05-20
npm run dev正常
错误
c:\Users\zsr\Desktop\learnServer\blog-express-9-2\node_modules\mysql\lib\ConnectionConfig.js:12
this.host = options.host || ‘localhost’;
^
TypeError: Cannot read property ‘host’ of undefined
at new ConnectionConfig (c:\Users\zsr\Desktop\learnServer\blog-express-9-2\node_modules\mysql\lib\ConnectionConfig.js:12:37)
at Object.createConnection (c:\Users\zsr\Desktop\learnServer\blog-express-9-2\node_modules\mysql\index.js:13:34)
at Object. (c:\Users\zsr\Desktop\learnServer\blog-express-9-2\db\mysql.js:5:19)
at Module._compile (module.js:653:30)
at Object.Module._extensions…js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
2回答
-
weixin_慕盖茨3412677
2021-08-01
你把node_modules依赖包删除了,重新npm install就可以了
10 -
双越
2019-05-20
提示 options 是 undefined ,顺着这个错误自己排查一下。
022019-05-21
相似问题
回答 1
回答 2