guatedude2/pixijs-cli

Serves but doesn't deploy

dsowsy opened this issue · 21 comments

I can run pixijs serve just fine and it opens up and runs the web page but it doesn't move/create the code for iOS.

pixijs run ios --emulator 

What's the correct command to really deploy into deploy/www and put the index.html there?

yeah thats the correct command but you have to add the platform first:
pixijs platform add ios

Please let me know if you have any other questions

The platform is there. I added it.
It's in the platforms.json too.

let me look into it.

Thanks!

ok i found a bug... let me push the new version

ok run npm install pixijs-cli -g and make sure the version is 0.2.2.

Let me know if this doesn't work

Still getting a warning,

Pixi.js CLI - 0.2.2


Building project...Warning: ignoring input sourcemap for lib/vendor/vendor.js because ENOENT: no such file or directory, open '/Users/test/Desktop/Bar/tmp/broccoli_merge_trees-output_path-D8jI8rtd.tmp/lib/vendor/pixi.min.js.map'

done
The format of cordova.raw.* methods "options" argument was changed in 5.4.0. "options.options" property now should be an object instead of an array of plain strings. Though the old format is still supported, consider updating your cordova.raw.* method calls to use new argument format.
cp: copyFileSync: could not write to dest file (code=EACCES):/Users/test/Desktop/Bar/deploy/platforms/ios/Bar/config.xml

ERROR running one or more of the platforms: Error: EACCES: permission denied, open '/Users/test/Desktop/Bar/deploy/platforms/ios/ios.json'
You may not have the required environment or OS to run this project

Good news is: The browser platform can now be added and run it seems.
Bad news: ios isn't becoming an Installed platform any more.

$ pixijs platform list
Pixi.js CLI - 0.2.2

Installed platforms: browser 4.0.0
Available platforms: amazon-fireos, android, blackberry10, firefoxos, ios, osx, webos

ok looks like it's a compatibility issue. I'll take a look at it tonight and fix the deprecation dependency

Ok I downgraded the cordova version to 5.3.3 to keep the compatibility with the library. Can you try again? Maybe just try to create a project from scratch just to test it.

pixijs-cli create test
cd test
pixjis-cli platform add ios
pixijs-cli run ios --emulator

I upgraded to Pixi.js CLI - 0.2.3
It doesn't do "Adding ios project..." or anything like when it does "Adding browser project.." trying out on a new test project like you suggested. Under (5.4.1) Then I downgraded Cordova to @5.3.3, and did the same, and the problem persists.

could you post the logs?

mac-the-knife:Desktop test$ pixijs create test
Pixi.js CLI - 0.2.3

Generating project files...done!
Creating project file...done

Downloading add-on "game-window"...done
Checking dependencies...
  downloading add-on "pixi"...done
  downloading add-on "pixi-resource"...done
  downloading add-on "game-scene"...done
  downloading vendor library "https://raw.githubusercontent.com/goodboydigital/pixi.js/master/bin/pixi.min.js"...done
  downloading add-on "audio"...done
  downloading add-on "keyboard"...done
Project created succesfully!
mac-the-knife:Desktop test$ cd test
mac-the-knife:test test$ pixijs add platform ios
Pixi.js CLI - 0.2.3

Invalid option  add platform ios
Usage: pixijs <command (Default: help)>

Available commands in pixi.js CLI:

pixijs create, c <name>
  Creates a new pixi.js CLI project
  --path <path> the path to create the new project
  --force overwrites exisiting files

pixijs serve, s <options>
  Starts an http server with LiveReload
  --port <port> the port to bind to [4200]
  --host <host> the host to bind to [localhost]
  --live-reload-port <port> the port to start LiveReload on [35729]

pixijs platform (list | ls | add | remove | rm | update | up) <options>
  Adds, remove or list cordova platforms
  [list | ls] list all platforms for which the project will build
  add <platform> [<platform> ...] add one (or more) platforms as a build target for the project
  [remove | rm] <platform> [<platform> ...] removes one (or more) platform build targets from the project
  [update | up] <platform> updates the Cordova version used for the given platform

pixijs run [<platforms>] <options>
  Launches the project on the provided platforms (Note: Will launch on all projects if not platform is provided)
  --debug enables debug mode when running
  --release creates a release of the project before running it
  --device launches the project on connected devices of the selected platforms
  --emulator launches the project on the selected platform emulator if available
  --nobuild launches the project without rebuilding the project
  --list lists all emulators and devices available for the selected platform

pixijs compile [<platforms>] <options>
  Comile the project on the provided platforms (Note: Will compile on all projects if not platform is provided)
  --debug enables debug mode when running
  --release creates a release of the project before running it
  --device launches the project on connected devices of the selected platforms
  --emulator launches the project on the selected platform emulator if available
  --nobuild launches the project without rebuilding the project
  --list lists all emulators and devices available for the selected platform

pixijs plugin (list | ls | add | remove | rm | search | save) <plugin_name>
  Adds, remove, list or searches a cordova plugin
  [list | ls] list all platforms for which the project will build
  add <plugin_name> [<plugin_name> ...] add one (or more) cordova plugins to the project
  [remove | rm] <plugin_name> [<plugin_name> ...] removes one (or more) cordova plugins to the project
  search <plugin_name> searches the cordova plugin repository for the given plugin name keyword
  save <plugin_name> save the versions/folders/git-urls of currently installed cordova plugins into the project config.xml

pixijs addon, a (search | add | remove | publish) <addon_name>
  Search, adds, removes or publishes a pixi.js add-ons
  search <addon_name> searches the registry for a add-on
  add <addon_name> adds a add-on from the registry to the current project
  remove <addon_name> removes an existing add-on from the current project
  publish <addon_name> publishes an existing add-on in the project. See documentation on publishing for more details.

pixijs clean
  Cleans the project temporary build folders

pixijs help, --help
  Outputs the usage instructions for all commands or the provided command

mac-the-knife:test test$ pixijs platform add ios
Pixi.js CLI - 0.2.3

mac-the-knife:test test$ 
mac-the-knife:test test$ ls
deploy  libs    public  src
mac-the-knife:test test$ pixijs run ios --emulator
Pixi.js CLI - 0.2.3


Building project...Warning: ignoring input sourcemap for lib/vendor/vendor.js because ENOENT: no such file or directory, open '/Users/test/Desktop/test/tmp/broccoli_merge_trees-output_path-IGT5si93.tmp/lib/vendor/pixi.min.js.map'
done
CordovaError: No platforms added to this project. Please use `cordova platform add <platform>`.
    at Object.preProcessOptions (/usr/local/lib/node_modules/pixijs-cli/node_modules/cordova/node_modules/cordova-lib/src/cordova/util.js:245:15)
    at Object.run (/usr/local/lib/node_modules/pixijs-cli/node_modules/cordova/node_modules/cordova-lib/src/cordova/run.js:30:28)
    at /usr/local/lib/node_modules/pixijs-cli/lib/cordova.js:124:36
    at lib$es6$promise$$internal$$tryCatch (/usr/local/lib/node_modules/pixijs-cli/node_modules/broccoli-es6modules/node_modules/esperanto/node_modules/sander/node_modules/es6-promise/dist/es6-promise.js:331:16)
    at lib$es6$promise$$internal$$invokeCallback (/usr/local/lib/node_modules/pixijs-cli/node_modules/broccoli-es6modules/node_modules/esperanto/node_modules/sander/node_modules/es6-promise/dist/es6-promise.js:343:17)
    at lib$es6$promise$$internal$$publish (/usr/local/lib/node_modules/pixijs-cli/node_modules/broccoli-es6modules/node_modules/esperanto/node_modules/sander/node_modules/es6-promise/dist/es6-promise.js:314:11)
    at lib$es6$promise$asap$$flush (/usr/local/lib/node_modules/pixijs-cli/node_modules/broccoli-es6modules/node_modules/esperanto/node_modules/sander/node_modules/es6-promise/dist/es6-promise.js:125:9)
    at doNTCallback0 (node.js:419:9)
    at process._tickCallback (node.js:348:13)
No platforms added to this project. Please use `cordova platform add <platform>`.

mac-the-knife:test test$ 

Hmm looks like the pixijs platform add ios didn't work. Ok let me work on this

So after taking a look at this and running it on a mac book pro without having pixijs-cli installed it looks like it works. Something tells me you might have some sort of conflicting dependency of sorts.

The expected output should look like this:

~/Projects/test » npm install pixijs-cli -g
npm WARN deprecated lodash-node@2.4.1: This package is no longer maintained. See its readme for upgrade details.
npm WARN deprecated esperanto@0.6.34: Esperanto is deprecated. Please use http://rollupjs.org instead. See https://github.com/rollup/rollup/wiki/Migrating-from-Esperanto for more details
npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"4.0.0","npm":"2.14.2"})
/Users/Alex/.nvm/versions/node/v4.0.0/bin/pixijs -> /Users/Alex/.nvm/versions/node/v4.0.0/lib/node_modules/pixijs-cli/bin/pixijs
pixijs-cli@0.2.3 /Users/Alex/.nvm/versions/node/v4.0.0/lib/node_modules/pixijs-cli
├── node-sha1@0.0.1
├── broccoli-slow-trees@1.1.0
├── copy-dereference@1.0.0
├── promise-map-series@0.2.2
├── mime@1.3.4
├── colors@1.1.2
├── rsvp@3.1.0
├── fs-extra@0.16.5 (jsonfile@2.2.3, graceful-fs@3.0.8)
├── resolve@1.1.6
├── broccoli-concat@0.0.12 (broccoli-writer@0.1.1, js-string-escape@1.0.0, mkdirp@0.5.1)
├── broccoli-merge-trees@0.2.4 (symlink-or-copy@1.0.1, debug@2.2.0, broccoli-plugin@1.2.1)
├── connect@3.4.0 (utils-merge@1.0.0, parseurl@1.3.1, debug@2.2.0, finalhandler@0.4.0)
├── broccoli-funnel@0.2.15 (array-equal@1.0.0, blank-object@1.0.1, symlink-or-copy@1.0.1, path-posix@1.0.0, fs-tree-diff@0.3.1, fast-ordered-set@1.0.2, walk-sync@0.2.6, debug@2.2.0, mkdirp@0.5.1, broccoli-plugin@1.2.1, minimatch@2.0.10)
├── broccoli-kitchen-sink-helpers@0.2.9 (mkdirp@0.5.1, glob@5.0.15)
├── findup-sync@0.2.1 (glob@4.3.5)
├── rimraf@2.5.0 (glob@6.0.4)
├── errorhandler@1.4.3 (escape-html@1.0.3, accepts@1.3.0)
├── quick-temp@0.1.5 (mktemp@0.3.5, rimraf@2.2.8, underscore.string@2.3.3)
├── tiny-lr@0.1.7 (parseurl@1.3.1, qs@2.2.5, debug@2.0.0, livereload-js@2.2.2, faye-websocket@0.7.3, body-parser@1.8.4)
├── prompt@0.2.14 (revalidator@0.1.8, pkginfo@0.3.1, read@1.0.7, utile@0.2.1, winston@0.8.3)
├── broccoli-uglify-js@0.1.3 (broccoli-filter@0.1.14, uglify-js@2.4.24)
├── request@2.67.0 (is-typedarray@1.0.0, aws-sign2@0.6.0, forever-agent@0.6.1, caseless@0.11.0, stringstream@0.0.5, oauth-sign@0.8.0, tunnel-agent@0.4.2, isstream@0.1.2, json-stringify-safe@5.0.1, extend@3.0.0, combined-stream@1.0.5, node-uuid@1.4.7, qs@5.2.0, tough-cookie@2.2.1, mime-types@2.1.9, form-data@1.0.0-rc3, bl@1.0.0, http-signature@1.1.0, hawk@3.1.2, har-validator@2.0.5)
├── nconf@0.7.2 (ini@1.3.4, async@0.9.2, yargs@3.15.0)
├── handlebars@3.0.3 (optimist@0.6.1, source-map@0.1.43, uglify-js@2.3.6)
├── broccoli-sourcemap-concat@0.4.4 (broccoli-writer@0.1.1, broccoli-caching-writer@0.5.3, combined-stream@0.0.7, mkdirp@0.5.1, fast-sourcemap-concat@0.2.7, lodash-node@2.4.1)
├── broccoli-inject-livereload@0.1.1 (walk-sync@0.1.3, mkdirp@0.5.1, broccoli-caching-writer@0.5.5)
├── broccoli-es6modules@0.5.1 (walk-sync@0.1.3, mkdirp@0.5.1, esperanto@0.6.34, broccoli-caching-writer@0.5.3)
├── broccoli-babel-transpiler@4.1.0 (clone@0.2.0, broccoli-filter@0.1.14, babel-core@4.7.16)
├── jsdoc-parse@1.2.6 (test-value@1.0.1, feature-detect-es6@1.2.0, stream-connect@1.0.2, ansi-escape-sequences@2.2.2, object-tools@2.0.5, collect-json@1.0.5, array-tools@2.0.2, file-set@0.2.8, core-js@2.0.3, command-line-args@2.1.4, jsdoc-api@1.0.5)
└── cordova@5.3.3 (underscore@1.7.0, q@1.0.1, nopt@3.0.1, cordova-lib@5.3.3)
------------------------------------------------------------
~/Projects/test » pixijs create test
Pixi.js CLI - 0.2.3

Generating project files...done!
Creating project file...done

Downloading add-on "game-window"...done
Checking dependencies...
  downloading add-on "pixi"...done
  downloading add-on "pixi-resource"...done
  downloading add-on "game-scene"...done
  downloading vendor library "https://raw.githubusercontent.com/goodboydigital/pixi.js/master/bin/pixi.min.js"...done
  downloading add-on "audio"...done
  downloading add-on "keyboard"...done
Project created succesfully!
------------------------------------------------------------
~/Projects/test » ls       
test
------------------------------------------------------------
~/Projects/test » cd test 
------------------------------------------------------------
~/Projects/test/test » ls
deploy libs   public src
------------------------------------------------------------
~/Projects/test/test » pixijs platform add ios
Pixi.js CLI - 0.2.3

Adding ios project...
iOS project created with cordova-ios@3.9.2
Discovered plugin "cordova-plugin-whitelist" in config.xml. Installing to the project
Fetching plugin "cordova-plugin-whitelist@1" via npm
Installing "cordova-plugin-whitelist" for ios

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.

------------------------------------------------------------
~/Projects/test/test » pixijs run ios --emulator
Pixi.js CLI - 0.2.2


Building project...Warning: ignoring input sourcemap for lib/vendor/vendor.js because ENOENT: no such file or directory, open '/Users/Alex/Projects/test/test/tmp/broccoli_merge_trees-output_path-mRKWkjwU.tmp/lib/vendor/pixi.min.js.map'
done
Running command: /Users/Alex/Projects/test/test/deploy/platforms/ios/cordova/run --emulator
Building project  : /Users/Alex/Projects/test/test/deploy/platforms/ios/test.xcodeproj
    Configuration : Debug
    Platform      : emulator
Build settings from command line:
    ARCHS = i386
    CONFIGURATION_BUILD_DIR = /Users/Alex/Projects/test/test/deploy/platforms/ios/build/emulator
    SDKROOT = iphonesimulator9.2
    SHARED_PRECOMPS_DIR = /Users/Alex/Projects/test/test/deploy/platforms/ios/build/sharedpch
    VALID_ARCHS = i386

Build settings from configuration file '/Users/Alex/Projects/test/test/deploy/platforms/ios/cordova/build-debug.xcconfig':
    CODE_SIGN_IDENTITY = iPhone Developer
    ENABLE_BITCODE = NO

=== BUILD TARGET CordovaLib OF PROJECT CordovaLib WITH CONFIGURATION Debug ===

Check dependencies

CpHeader Classes/NSDictionary+Extensions.h /Users/Alex/Projects/test/test/deploy/platforms/ios/build/emulator/include/Cordova/NSDictionary+Extensions.h
    cd /Users/Alex/Projects/test/test/deploy/platforms/ios/CordovaLib
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/Cellar/ant/1.9.4/libexec/bin:/Applications/adt/sdk/tools:/Applications/adt/sdk/platform-tools:/Applications/adt/sdk:/Users/Alex/cocos2d-x-3.9/templates:/Users/Alex/cocos2d-x-3.9/tools/cocos2d-console/bin:/Users/Alex/.nvm/versions/node/v4.0.0/bin:/usr/local/Cellar/ant/1.9.4/libexec/bin:/Applications/adt/sdk/tools:/Applications/adt/sdk/platform-tools:/Applications/adt/sdk:/Users/Alex/cocos2d-x-3.6/templates:/Users/Alex/cocos2d-x-3.6/tools/cocos2d-console/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/adt/sdk/tools:/Applications/adt/sdk/platform-tools:/Applications/adt/sdk/tools:/Applications/adt/sdk/platform-tools"
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/Alex/Projects/test/test/deploy/platforms/ios/CordovaLib/Classes/NSDictionary+Extensions.h /Users/Alex/Projects/test/test/deploy/platforms/ios/build/emulator/include/Cordova

.....
<I remove bunch of compiled code here>
.....
** BUILD SUCCEEDED **

No target specified for emulator. Deploying to iPhone-6 simulator
2016-01-17 13:39:44.889 ios-sim[13321:1147745] stderrPath: /Users/Alex/Projects/test/test/deploy/platforms/ios/cordova/console.log
2016-01-17 13:39:44.889 ios-sim[13321:1147745] stdoutPath: /Users/Alex/Projects/test/test/deploy/platforms/ios/cordova/console.log
2016-01-17 13:39:45.004 ios-sim[13321:1147745] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-9542/DVTFoundation/PlugInArchitecture/PlugInManager/DVTPlugInManager.m:259
Details:  Requested but did not find extension point with identifier Xcode.DVTFoundation.DevicePlatformMapping
Object:   <DVTPlugInManager: 0x7fc5d9e99830>
Method:   -extensionPointWithIdentifier:
Thread:   <NSThread: 0x7fc5d9c0bc20>{number = 1, name = main}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
** RUN SUCCEEDED **

~/Projects/test/test » 

The interesting part is that you don't get an output from cordova when you add the iOS platform like i did above.

Maybe we can try removing and re-installing pixijs in your machine.

So try this:

  1. Check your npm version npm version. I'm running Node 4.0.0 with npm 2.14.2.
  2. Remove pixijs-cli and verify it's completely gone npm uninstall pixijs-cli -g and then which pixijs. Should display pixijs not found
  3. Install pixijs again npm install pixijs-cli -g
  4. And finally verify dependencies npm list -g --depth=0. Should display your globally installed modules.
  5. Create a new project like we did before.

Thanks for bearing with me. I hope we can solve this weird issue.

My current versions are
node 4.2.4
npm 2.14.12

I'm uninstalling and reinstalling, and rerunning the test, and will see if a new project then makes any headway and will see if I have to roll back npm and node afterwards.

No luck with that version. No luck with 4.0.0/2.14.2 either.

this is one of those twilight issues... i might need to update the cordova build commands. have you tried creating a cordova project?

I'm looking into it. I have a hunch I know what it might be. Will get back to you ASAP.

great! let me know

Indeed it was a twilight zone issue because I was making iOS targets with Cordova a week ago. The problem seems to be there was some npm lock with an incorrect permission when I went to create a new Cordova project from scratch independent of pixijs-cli. It was failing silently on something, and I thought it was generating successfully.

ah yes the good old npm permissions. So its working now?