繁体   English   中英

ThreeNodes.js / NodeJS / CoffeeScript-构建为静态JS时出错

[英]ThreeNodes.js / NodeJS / CoffeeScript - Error During Build to Static JS

我用node来运行server.js,并且一切正常。 这是我尝试运行构建脚本以创建编译的静态版本的时候。 我还应该提到,它确实输出了大多数文件,但是在中途抛出了错误。

我跑了:

node server.js build

在“开始优化javascript ...”之前,它似乎工作正常。

错误输出:

/root/threenodes/ThreeNodes.js/node_modules/requirejs/bin/r.js:14153
                throw new Error(errorMsg);
                      ^
Error: TypeError: Object function () {
            //A version of a require function that passes a moduleName
            //value for items that may need to
            //look up paths relative to the moduleName
            var args = aps.call(arguments, 0), lastArg;
            if (enableBuildCallback &&
                    isFunction((lastArg = args[args.length - 1]))) {
                lastArg.__requireJsBuild = true;
            }
            args.push(relMap);
            return func.apply(null, args);
        } has no method 'nameToUrl'
In module tree:
    threenodes/App
      order

    at Object.load (eval at <anonymous> (/root/threenodes/ThreeNodes.js/node_modules/requirejs/bin/r.js:13687:38))

我刚刚提交了对threenodes.js的修复,它可以解决您的问题。 这是由于requirejs已更新,现在不建议使用!order插件引起的。 因此,解决方法只是在package.json中定义更精确的requirejs版本。

https://github.com/idflood/ThreeNodes.js/commit/440757aa579ae3d35354e960a2bd5745bdee6847

要解决这个问题:

  • git pull起源大师
  • npm install -d
  • 节点server.js构建

作为附带说明,dev分支使用新版本的requirejs。 它仍未在master上合并,因为我已开始处理“节点分组”,但尚未完成。 除此之外,所有其他功能应与master分支上的工作方式相同。 因此,如果您打算在三节点之上开发某些东西,我建议您使用dev分支; ]

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM