我在为Phonegap项目启动ripple模拟器时遇到问题。当我在常规开发文件夹(而不是平台子文件夹)中启动Ripple-Emulate命令时,会启动纹波仿真器,但它会显示错误消息:
Error: static() root path required
at Function.static (/usr/local/lib/node_modules/ripple-emulator/node_modules/express/node_modules/connect/lib/middleware/static.js:49:20)
at Object.handle (/usr/local/lib/node_modules/ripple-emulator/lib/server/emulate/static.js:6:27)
at next (/usr/local/lib/node_modules/ripple-emulator/node_modules/express/node_modules/connect/lib/proto.js:199:15)
at handle (/usr/local/lib/node_modules/ripple-emulator/lib/server/emulate/hosted.js:156:17)
at Object.handle (/usr/local/lib/node_modules/ripple-emulator/lib/server/emulate/hosted.js:183:13)
at next (/usr/local/lib/node_modules/ripple-emulator/node_modules/express/node_modules/connect/lib/proto.js:199:15)
at Object.handle (/usr/local/lib/node_modules/ripple-emulator/lib/server/emulate/cordovaProject.js:54:13)
at next (/usr/local/lib/node_modules/ripple-emulator/node_modules/express/node_modules/connect/lib/proto.js:199:15)
at next (/usr/local/lib/node_modules/ripple-emulator/node_modules/express/node_modules/connect/lib/proto.js:174:78)
at pass (/usr/local/lib/node_modules/ripple-emulator/node_modules/express/lib/router/index.js:107:24)
Chrome表明它:无法加载资源:服务器响应状态为500(内部服务器错误)(无法加载config.xml文件),尽管我的www文件夹中有config.xml文件。
当我启动ripple emulate --path platforms / ios / assets / www时,这个问题也无法解决,然后它显示:无法GET /错误(再次抱怨config.xml文件)。
任何人都知道解决方案吗?
答案 0 :(得分:6)
您似乎正在为IOS设备创建应用。但是Ripple默认为Android设备,因此如果您将其更改为IOS设备并尝试,则会发生错误。
答案 1 :(得分:3)
如果您使用Ripple with Ionic框架,则需要设置应用程序www文件夹的路径(或者它会为您提供这些错误消息)。
ripple emulate --path /Users/user/Desktop/app/www