Node.js 将错误获取为str.charCodeAt不是一个函数
在使用npm的Msg91包时,我收到错误,因为str.charCodeAt不是isUnicodeString的函数 这是麦可德Node.js 将错误获取为str.charCodeAt不是一个函数,node.js,Node.js,在使用npm的Msg91包时,我收到错误,因为str.charCodeAt不是isUnicodeString的函数 这是麦可德 module.exports = function(router, msg91){ router.get('/try', function(req, res){ res.render('secured/try', {user : req.user}); }); router.post('
module.exports = function(router, msg91){
router.get('/try', function(req, res){
res.render('secured/try', {user : req.user});
});
router.post('/try', function(req, res){
var message = 'Hapserve testing message from Developer';
var mobileNo = parseInt(req.body.phone_no);
console.log(mobileNo);
msg91.send(mobileNo, message, function(err, response){
if(err)
throw err;
console.log(response);
});
});
};
帮助我解决这个问题。我在Msg91 npm包中发现了这个问题,我创建了一个请求,让作者合并它 这是在
index.js
请继续关注合并是否尝试调试该库?看看它为什么失败,它期望什么。如果您很难理解出现故障的原因,请向我们展示它出现故障的函数及其输入参数。告诉我需要在index.js中更改什么。转到第27行并更改:
message=validateMessage(validateMessage)代码>至消息=验证消息(消息)代码>但我的建议是将索引文件保存为项目中的一个模块,而不是通过npm使用它,因为每次重新安装节点模块或将其部署到服务器时,您的更新都会被覆盖。我已经做了一个更改,但仍然收到相同的错误更改文件后是否重新启动了服务器?