[英]What is wrong in the following javascript/nodejs code?
module.exports=function(config)
{
var SphereClient = require('sphere-node-sdk').SphereClient;
var Config = require(config.config_dir+'/sphereio');
var client = new SphereClient(Config);
var ret=
{
get:function(module){return require('./'+module)(client);}
};
return ret;
}
它说在get:function(之后出现错误::意外的'('。是否存在一些无效的语法?我什至尝试将get更改为geet或其他方式,仍然会发生错误。
如果在需要的文件中存在语法错误(或js编译器说存在语法错误),则可能会发生这些类型的错误。 编译器没有提供目标文件中该行的提示。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.