在教程中使用流星构建时出现非法错误



我正在遵循创建Meteor应用程序的教程,并希望在运行Mac OS 10.8.5的机器上本地部署它。由于某些node_modules提供的一些测试和示例文件中存在错误,构建失败。下面是输出:

$ meteor build osx --architecture os.osx.x86_64 --directory
WARNING: The output directory is under your source tree.
Errors prevented bundling:                    
While building the application:               
build/bundle/programs/server/npm/webapp/node_modules/connect/node_modules/multiparty/examples/azureblobstorage.js:38:2:
Unexpected token )
build/bundle/programs/server/npm/webapp/node_modules/useragent/node_modules/lru-cache/test/memory-leak.js:1:15:
Unexpected token ILLEGAL
build/bundle/programs/server/npm/logging/node_modules/cli-color/test/__playground/throbber.formatted.js:1:15:
Unexpected token ILLEGAL
build/bundle/programs/server/npm/logging/node_modules/cli-color/test/__playground/throbber.js:1:15:
Unexpected token ILLEGAL
build/bundle/programs/server/npm/webapp/node_modules/useragent/bin/testfiles.js:1:15:
Unexpected token ILLEGAL
build/bundle/programs/server/npm/webapp/node_modules/useragent/bin/update.js:1:15:
Unexpected token ILLEGAL
build/bundle/programs/web.browser/head.html:1: bad formatting in HTML template

我知道我可以部署到Meteor自己的服务器上,但我的目的是发现如何将项目部署到我自己的服务器上,这样我就可以判断这个过程有多顺利。最后,我想使用RedHat服务器,但现在我更喜欢在本地测试。

一种解决方案是删除不需要的测试和示例文件,但是这些文件似乎是在构建过程中自动下载的。

你能推荐什么吗?

使用.build(或任何隐藏的内容)作为构建目录或将其移出项目目录树。这可以通过提供正确的--directory选项值来实现。否则meteor将把构建本身放入bundle中,这将导致无限递归。

最新更新