Titanium - new versions - titanium

I created an app with Titanium, 2 years ago. I want to develop a new one, but from the beginning, it doesn't work.
I just updated the SDK to 7.4.0GA, and, when I run the command "ti create" in my console, there is an error :
[ERROR] Failed to load command "create"
[ERROR] SyntaxError: Unexpected token ...
at Object.<anonymous> (...\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\lib\exception.js:33:27)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.defineProperty.get (...\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\lib\appc.js:63:11)
at ...\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:2111:9
at apply (...\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:21:25)
at ...\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:56:12
at _insert (...\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:2220:9)
at Object.q.push (...\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:2267:13)
at Object.findExecutable (...\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\lib\subprocess.js:113:8)
at resolveNode (...\AppData\Roaming\npm\node_modules\titanium\lib\titanium.js:97:34)
at ...\AppData\Roaming\npm\node_modules\titanium\lib\titanium.js:74:5
at Object.<anonymous> (...\AppData\Roaming\npm\node_modules\titanium\lib\titanium.js:80:2)
I also tried with SDK 7.3.1.GA
What can I do ?
Thanks a lot :)

Update your CLI tools. Run npm install -g titanum appcelerator alloy and appc setup to check the environment.
After that ti create or appc ti create should work

Related

New ReactNative App Triggers Bundler Error: error Unexpected token =

Every time I try to create a new React Native app, I receive this error in the Metro Bundler:
error Unexpected token =.
/Users/lukeschoenberger/repos/PodApp/node_modules/metro-cache/src/stores/HttpStore.js:31
static HttpError = HttpError;
^
SyntaxError: Unexpected token =
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/Users/lukeschoenberger/repos/PodApp/node_modules/metro-cache/src/stores/HttpGetStore.js:12:19)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
info Run CLI with --verbose flag for more details.
Process terminated. Press <enter> to close the window
I'm running: npx react-native run-ios.
When I create the script, I create the app, I run: npx react-native init AppName
I'm on node v14.17.1.
The startup script also says: success Successfully launched the app on the simulator
What am I doing wrong?
I had the same error because I was running on node v10.
After switching to node v14.17.5 (npm v6.14.14) via nvm, it solved the issue.
Can you verify you are really on v14.17.1?
For me, I tried using node v14.17.5 and it didn't work. I removed:
static HttpError = HttpError;
static NetworkError = NetworkError;
from node_modules/metro-config/node_modules/metro-cache/src/stores/HttpStore.js
and it worked.
Can use patch-package as well:
yarn patch-package metro-config/metro-cache

npm run serve unexpected token ...options

I am trying to run IBM blockchain election system, Evote. link=https://github.com/IBM/evote.
when I am trying to run client by using "npm run serve". I am getting following error.
ahmed#ahmed-Inspiron-3580:~/evote/web-app/client$ npm run serve
> client#0.1.0 serve /home/ahmed/evote/web-app/client
> vue-cli-service serve
/home/ahmed/evote/web-app/client/node_modules/open/index.js:29
...options
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:74:10)
at Object.runInThisContext (vm.js:116:10)
at Module._compile (module.js:533:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/ahmed/evote/web-app/client/node_modules/#vue/cli-shared-utils/lib/openBrowser.js:9:14)
You are probably using a very old version of node.js. You can check the version by doing
node -v
you need to be using node 8 (it may not work with any version higher than that).
I would recommend using nvm as a mechanism for managing node versions. See https://github.com/nvm-sh/nvm

Error starting up React Native packager "Cannot find module metro-bundler"

I have a simple React Native project that works fine on the original machine I created it on, but when I clone the git repo on another machine and try to run the iOS project, I get this error when starting the packager:
module.js:471
throw err;
^
Error: Cannot find module 'metro-bundler/build/lib/formatBanner'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (.../node_modules/react-native/local-cli/server/checkNodeVersion.js:12:20)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
Process terminated. Press <enter> to close the window
The project is on GitHub here. I purposely didn't git ignore the node_modules folder because this project has some slight modifications to React Native itself. It seems if I delete node_modules and yarn install it resolves the issue but I'd like to have the GitHub repo in a state where you can clone and you don't need to run anything to set up dependencies.

Syntax error on webdriver-manager 10.2.9

Post from issue #170:
After updating to the newest version, I get the following error on running 'webdriver-manager' command.
C:\Users\(user)\AppData\Roaming\npm\node_modules\webdriver-manager\built\lib\cli\logger.js:66
info(...msgs) {
^^^
SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (C:\Users\(user)\AppData\Roaming\npm\node_modules\we
bdriver-manager\built\lib\cli\index.js:8:10)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
Why is this happening? Version 10.2.9 requires node 6 and since it did not follow semantic versioning / caused a big problem, it was unpublished from npm and 10.2.10 has been published. To read more about 10.2.10, see the changelog.
If you have encountered this issue, please remove the node_module/webdriver-manager and do a fresh npm install.
You can downgrade webdriver version to 9.0 with this command:
npm install -g webdriver-manager#9.0

Error running Gulp in Sylius

I've got a new install of Sylius that I'm working with. I just installed NPM and Gulp, and wanted to run Gulp for the first time. I'm getting an error, and have never worked with Gulp or Sylius before, so it's a little hard for me to understand:
gulp
module.js:328
throw err;
^
Error: Cannot find module 'gulp-if'
at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/var/www/mysite.com/public_html/Gulpfile.js:2:14)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
This is happening on a Ubuntu system, but it also seems to be throwing the same error on my Mac, with a copy of the same Sylius install on it.
try running npm i -S gulp-if in your project. What this does is install the gulp-if package and saves it in your package.json file