Hello, now that the intel xdk cloud system is deprecated, I am trying to switch to Cordova CLI, but I have a problem.
Every time I try to build the app I have an error saying that npm is not recognized.
I even tried to create a basic Hello World app, using
cordova create hello_world cordova platform add android
The first command runs well, but the second one gives me this error
I have the same error when I try to create a project using PhoneGap, I even run PostInstall.bat, but it still does't work.
Do I have to install anything else, can you please help me?
链接已复制
Alex -- what happens if you type "npm --version" at the command prompt? If nothing, you either do not have npm installed or it is missing from your path. If you do see a response, then there is something goofy about your Node.js or Cordova CLI install.
Alex,
Great. Good luck.
For me, after some time searching and testing, I am able to build and publish normally without XDK.
I do not build with Cordova. Cordova I use to prepare everything, but I build with Android Studio and XCode.
You will need a Mac (or Virtual Machine with MacOS) to build for iOS.
Hamilton
The worst part is understand the Apple concepts. After this initial pain (for me it was a big pain), it is pretty easy. XCode can include/generate all certificates for each app. And, after build, just one click to send to Apple Store. Don´t be affraid.
Alex Hang wrote:
I typed npm version, and it seems i have it installed ( I attached the screenshot)
I think there is a problem with Cordova CLI, but what about PhoneGap Desktop App? Isn't this weird? Both have the same error, but npm is installed corectly......
The "PhoneGap Desktop App" is built on top of PhoneGap CLI, which is built on top of Cordova CLI. In essence, PhoneGap CLI is Cordova CLI with a special "redirector" that performs your builds with PhoneGap Build if you do not have the right tools to perform the build locally.
Here's an example of how it works:
- Assume you are on a Windows machine and have Visual Studio and Android Studio installed.
- Obviously, you can build locally for Windows and Android, but not for iOS.
then:
- Build for Android >> results in running Cordova CLI under the hood, on your machine
--which uses your local Android build tools to actually perform the build - Build for Windows >> results in running Cordova CLI under the hood, on your machine
--using your local Visual Studio tools to perform the actual build - Build for iOS >> results in sending your project to PhoneGap Build
--where it is built remotely on a Mac using Xcode on that Mac and returned to you
There are ways to force all builds to happen remotely, using PhoneGap Build, but the default is to build locally unless you do not have the build tools. Likewise, PhoneGap Build uses standard Cordova CLI, on a server, with a few enhancements to deal with cloud-based builds (such as being able to specify the CLI version number) and with a few limitations (such as not supporting gradle scripts and hooks scripts in plugins, for security reasons). These limitations are similar to what you have with the Intel XDK cloud-based build system.
Hope this helps to clarify.
That's correct, the build system will be retired. The rest of the XDK, as you see it today, will continue to be usable after the build system has been retired. The build tiles will disappear when the build system is retired, but the "Cordova Build Package" tool that allows you to export a project for use with PhoneGap Build or Cordova CLI will still work (it does not rely on the backend).
