Meteor Error: Must pass options.rootUrl or set ROOT_URL in the server environment解决
2013-03-19 18:26
1021 查看
运行环境:
ubuntu 12.10
Mongodb 2.2.3
Nodejs 0.8.22
Meteor 0.5.9
在将Meteor工程导出来的时候,然后运行mongodb,再用nodejs运行main.js。在0.5.9之前是没什么问题的,更新到0.5.9就出现
Error: Must pass options.rootUrl or set ROOT_URL in the server environment
根据路径一路排查,发现在app/packages/meteor/url_server.js这个文件里的process.env.ROOT_URL是undefined。这个变量是meteor运行时的配置之一。之所以为什么是undefined,暂时不解。但解决的办法是:
在app/packages/meteor/url_server.js的首行添加
process.env.ROOT_URL = "http://localhost:3000";
添加之后再运行就OK了。
这是因为在meteor还没导出来之前,输出该变量的值就是上面的"http://localhost:3000"。所以在导出项目之后,这个变量变成undefined后,手动修改回原来的值是可行的。
ubuntu 12.10
Mongodb 2.2.3
Nodejs 0.8.22
Meteor 0.5.9
在将Meteor工程导出来的时候,然后运行mongodb,再用nodejs运行main.js。在0.5.9之前是没什么问题的,更新到0.5.9就出现
PORT=3000 MONGO_URL=mongodb://localhost:27017/myapp node bundle/main.js
Error: Must pass options.rootUrl or set ROOT_URL in the server environment
根据路径一路排查,发现在app/packages/meteor/url_server.js这个文件里的process.env.ROOT_URL是undefined。这个变量是meteor运行时的配置之一。之所以为什么是undefined,暂时不解。但解决的办法是:
在app/packages/meteor/url_server.js的首行添加
process.env.ROOT_URL = "http://localhost:3000";
添加之后再运行就OK了。
这是因为在meteor还没导出来之前,输出该变量的值就是上面的"http://localhost:3000"。所以在导出项目之后,这个变量变成undefined后,手动修改回原来的值是可行的。
相关文章推荐
- JDeveloper JSP files must reside in the server root directory or a subdirectory
- TypeError: view must be a callable or a list/tuple in the case of include().解决办法
- 访问网站提示An error occurred on the server when processing the URL的解决方法
- vs2005下出现“Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive”的解决方法
- Cannot find hadoop installation: $HADOOP_HOME or $HADOOP_PREFIX must be set or hadoop must be in the
- 解决IIS7运行ASP提示错误:An error occurred on the server when processing the URL. Please contact the system administrator
- 解决方法:An error occurred on the server when processing the URL. Please contact the system administrato
- django 解决: You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.c
- Maven报错 解决方案。ERROR: No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id
- 解决方法:An error occurred on the server when processing the URL. Please contact the system administrator
- [Asp]解决IIS7中出现An error occurred on the server when processing the URL错误提示的方法
- 解决方法:An error occurred on the server when processing the URL. Please contact the system administrato
- Web Service ERROR: Set JAVA_HOME to the path where the JDK (6.0 or higher) is installed解决方式
- Qt Creator needs a compiler set up to build. Configure a compiler in the kit options.解决
- JSF简单实例及无法正常访问的解决方法(404和The markup in the document preceding the root element must be well-formed. )
- 解决Windows server 2012 R2 系统使用IIS8浏览Asp程序出现"An error occurred on the server when processing the URL"错误
- Error: Target host must not be null, or set in parameters
- Maven报错 解决方案。ERROR: No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id
- Error: JAVA_HOME not found in your environment. Please set the JAVA_HOME variable in your environmen
- Maven报错 解决方案。ERROR: No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id