Node.js 如何使用node dist.js生成r.js
在requireJS网站上,他们说我们可以使用Node.js 如何使用node dist.js生成r.js,node.js,requirejs,r.js,Node.js,Requirejs,R.js,在requireJS网站上,他们说我们可以使用 "node dist.js" 来源 对我来说,它确实会出错: node git:(develop) ✗ node dist.js fs.js:549 return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode); ^ Error: ENOENT: no such file or directory
"node dist.js"
来源
对我来说,它确实会出错:
node git:(develop) ✗ node dist.js
fs.js:549 return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT: no such file or directory, open 'build/jslib/x.js'
at Error (native)
at Object.fs.openSync (fs.js:549:18)
at Object.fs.readFileSync (fs.js:397:15)
at Object.<anonymous> (/Users/mtaboubi/www/capsana-portal/webapp/unified-portal/src/main/webapp/node/dist.js:21:19)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:475:10)
at startup (node.js:117:18)
节点git:(开发)✗ node dist.js
js:549返回binding.open(pathModule.\u makeLong(path)、stringToFlags(flags)、mode);
^
错误:enoint:没有这样的文件或目录,请打开“build/jslib/x.js”
错误(本机)
在Object.fs.openSync(fs.js:549:18)
在Object.fs.readFileSync(fs.js:397:15)
反对。(/Users/mtaboubi/www/capsana-portal/webapp/unified-portal/src/main/webapp/node/dist.js:21:19)
在模块处编译(Module.js:434:26)
在Object.Module.\u extensions..js(Module.js:452:10)
在Module.load(Module.js:355:32)
在Function.Module.\u加载(Module.js:310:12)
位于Function.Module.runMain(Module.js:475:10)
启动时(node.js:117:18)
有什么帮助吗?谢谢听起来您的
dist.js
/fs.js
版本可能有错误
您能否尝试在原始版本的r.js存储库上运行node dist.js
- 如果这样做有效,那么您必须对
文件进行进一步的故障排除,才能找到问题的根源r.js
- 否则,这是您的开发环境的问题,在这种情况下,您可以在此处发布错误
fs.js
中。您是否在github repo的新克隆上运行此功能?我刚刚运行了命令,效果很好。新克隆的意义是什么?不,我没有使用github repo…我使用的存储库是本地的(与github无关),我的意思是在您的dist.js
/fs.js
版本中出现错误。。按照答案中的说明进行操作,并报告结果