Require报binding.open 错误
像这样
console.log('var config = require('./config/system.json'); ')
console.log('var bossServices = require("./services/bossServices");')
第一个是加载设置JSON,第二个是加载类, 第一行可以输出到JSON的数据 ,但加入了第二行时,就报
fs.js:427
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT, no such file or directory 'project/node_modules/requestify/node_modules/jquery/node_modules/jsdom/lib/../system.json'
at Object.fs.openSync (fs.js:427:18)
at Object.fs.readFileSync (fs.js:284:15)
at Object.<anonymous> (/Users/kenshinhu/Desktop/compound-helper-boss-dev/node_modules/requestify/node_modules/jquery/node_modules/jsdom/lib/jsdom.js:4:30)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at create (project/node_modules/requestify/node_modules/jquery/lib/node-jquery.js:5:14)
\n```
请问这个是问题是什么原因导致呢?
2 回复
同问此问题
project/node_modules/requestify/node_modules/jquery/node_modules/jsdom/lib/…/system.json 文件不存在?