Oracle JET错误:缺少文件夹'oraclejet-tooling / hooks /'

时间:2017-05-19 11:19:58

标签: android oracle oracle-jet

我正在尝试使用oracle jet框架构建混合应用程序。在这次尝试中,我试图将其作为Android应用程序运行。我已经通过了他们的文件中提到的per-requisists,当我在终端给出这个命令时,它给了我这个结果

mukund@mukund-ThinkPad-Edge-E431:~/OrJetWork$ npm list -g --depth=0
/usr/lib
├── cordova@7.0.1
├── generator-oraclejet@3.0.0
├── grunt-cli@1.2.0
├── npm@4.6.1
└── yo@1.8.5

和oracle get-yeomen generator

mukund@mukund-ThinkPad-Edge-E431:~/OrJetWork$ npm list -g generator-oraclejet
/usr/lib
└── generator-oraclejet@3.0.0 

我也设置了ANDROID_HOME,以及指向我的Android工作室相应文件夹的路径等

但是当我尝试按照教程

中提到的那样运行此命令时

http://docs.oracle.com/middleware/jet300/jet/developer/GUID-C75CD8DC-5084-4831-BE1A-FFEE4EA8600C.htm#JETDG-GUID-67A23ACD-73AD-45B8-8F44-D3501B9A8F24

我收到了这个错误。

mukund@mukund-ThinkPad-Edge-E431:~/OrJetWork$ yo oraclejet:hybrid app --appname="Sample NavBar" --template=navbar --platform=android
Processing template... navbar
Creating a new cordova project.
Adding platform : android
Using cordova-fetch for cordova-android@~6.2.2
Adding android project...
Creating Cordova project for the Android platform:
    Path: platforms/android
    Package: org.oraclejet.app
    Name: Sample_NavBar
    Activity: MainActivity
    Android target: android-25
Subproject Path: CordovaLib
Android project created with cordova-android@6.2.3
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
Installing "cordova-plugin-whitelist" for android

               This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.

Adding cordova-plugin-whitelist to package.json
Saved plugin info for "cordova-plugin-whitelist" to config.xml
--save flag or autosave detected
Saving android@~6.2.3 into config.xml file ...
Adding platform : browser
Using cordova-fetch for cordova-browser@~4.1.0
Adding browser project...
Running command: /home/mukund/OrJetWork/app/hybrid/node_modules/cordova-browser/bin/create /home/mukund/OrJetWork/app/hybrid/platforms/browser org.oraclejet.app "Sample NavBar"
Creating Browser project. Path: platforms/browser
Installing "cordova-plugin-whitelist" for browser
--save flag or autosave detected
Saving browser@~4.1.0 into config.xml file ...
Oracle JET: Your app structure is generated. Continuing with library install...
Performing npm install may take a bit...
Invoking npm install
npm WARN Invalid name: "Sample NavBar"
npm WARN app No description
npm WARN app No repository field.
npm WARN app No README data
npm WARN app No license field.
Error oraclejet:hybrid app --appname=Sample NavBar --template=navbar --platform=android 

Oracle JET Error: Missing folder 'oraclejet-tooling/hooks/'.

我不知道我在这里失踪了什么。请帮忙

1 个答案:

答案 0 :(得分:3)

放弃

--appname="Sample NavBar"

部分事情应该有效,这是一个错误。

它已在JET 4.0中修复,它引入了" ojet"替换"哟"支撑项目。 (尽管你仍然可以使用yo / grunt)

所以卸载旧的发电机:

npm uninstall -g generator-oraclejet

然后

npm install -g @oracle/generator-oraclejet

npm install -g @oracle/ojet-cli

然后尝试:

ojet create app1 --hybrid --appname="Sample Navbar" --template=navbar --platform=android

或旧式:

yo @oracle/oraclejet:hybrid app1 --appname="Sample NavBar" --template=navbar --platform=android

工作正常。