建筑时的离子错误

时间:2016-06-03 07:23:26

标签: javascript macos cordova ionic-framework

我正在使用离子测试版,我尝试构建标准选项卡应用程序(使用:namespace :deploy do task :create_symlink do on roles(:web) do execute "ln -s #{deploy_to}/shared/prod/config.php #{deploy_to}/current/config.php" end end end after :deploy, "deploy:create_symlink" 创建)以在Android上测试它,以便查看设备上的本机组件。我之前构建了一个cordova android应用程序,它确实可以在我的设备上运行。但我想要离子beta的原生成分,但命令ionic start appname tabs --v2确实返回了这个:

ionic build android

我在build.js中找到了这一行:

(node:2390) fs: re-evaluating native module sources is not             supported. If you are using the graceful-fs module, please update it to a        more recent version.

Running 'build:before' gulp task before build
[08:51:38] Starting 'clean'...
[08:51:38] Finished 'clean' after 49 ms
[08:51:38] Starting 'build'...
[08:51:38] Starting 'sass'...
[08:51:38] Starting 'html'...
[08:51:38] Starting 'fonts'...
[08:51:38] Starting 'scripts'...
[08:51:38] Finished 'scripts' after 47 ms
[08:51:38] Finished 'html' after 51 ms
[08:51:38] Finished 'fonts' after 60 ms
[08:51:39] Finished 'sass' after 925 ms
[08:51:46] Finished 'build' after 8.77 s
[08:51:46] Starting 'build:before'...
[08:51:46] Finished 'build:before' after 5.09 μs

Caught exception:
TypeError: Cannot read property 'slice' of undefined
at Object.run   (/usr/local/lib/node_modules/ionic/lib/ionic/build.js:29:32)
at Promise.apply (/usr/local/lib/node_modules/ionic/node_modules/q/q.js:1078:26)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/ionic/node_modules/q/q.js:741:41)
at /usr/local/lib/node_modules/ionic/node_modules/q/q.js:1304:14
at flush (/usr/local/lib/node_modules/ionic/node_modules/q/q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9) 

Mind letting us know? https://github.com/driftyco/ionic-cli/issues

但我不知道为什么切片属性未定义...

我用" n CLI"尝试了几乎每个版本的节点。我也尝试重新安装cordova,离子和节点,但它没有帮助。 如果我通过var rawArgs = rawCliArguments.slice(0); 构建离子v2项目,它会返回一个.apk,但在安装后它只会显示一个白色的屏幕。

来自cordova build android的信息:

ionic info

我真的很沮丧,我希望有人可以帮助我。

编辑: 即使我使用Cordova CLI: 6.2.0 Ionic Framework Version: 2.0.0-beta.7 Ionic CLI Version: 2.0.0-beta.26 Ionic App Lib Version: 2.0.0-beta.16 ios-deploy version: 1.8.6 ios-sim version: 5.0.8 OS: Mac OS X El Capitan Node Version: v6.2.1 Xcode version: Xcode 7.1 Build version 7B91b ,某些组件也无法在浏览器中运行。例如,具有5行和4列的离子网格布局(http://ionicframework.com/docs/components/#grid-explicit)仅显示一个列。

1 个答案:

答案 0 :(得分:2)

我现在可以毫无问题地构建项目。只需更新到最新的测试版sudo npm install -g ionic@beta

即可

发现此处报告的问题:link