Open-Xchange-Frontend / generator-ox-ui-module

Boilerplate code for Open-Xchange Appsuite UI modules
MIT License
3 stars 4 forks source link

Unable to generate packages or create distribution bundle #2

Closed baggachipz closed 9 years ago

baggachipz commented 9 years ago

Full console output pasted here: https://oxpad.net/uRsKrNdWrn

OSX Yosemite 10.10.2 Node v0.10.36 NPM v2.8.4 yo v1.4.6 generator-ox-ui-module v0.14.0

If I create a blank, brand new project and build it with grunt, then try to package it, I get the following errors for the following commands:

grunt dist:source --include-dependencies

Warning: Unable to write "dist/testapp-0.0.0/node_modules/appserver" file (Error code: EISDIR). Use --force to continue.

Aborted due to warnings.

yo ox-ui-module:rpm-pkg

/usr/local/lib/node_modules/generator-ox-ui-module/lib/pkg_generator.js:11
    var pkgFile = options.argv.remain[0] || 'package.json';
                              ^
TypeError: Cannot read property 'remain' of undefined

yo ox-ui-module:deb-pkg

/usr/local/lib/node_modules/generator-ox-ui-module/lib/pkg_generator.js:11
    var pkgFile = options.argv.remain[0] || 'package.json';
                              ^
TypeError: Cannot read property 'remain' of undefined

I may be doing something incorrectly, but I've been following instructions listed at: http://oxpedia.org/wiki/index.php?title=AppSuite:GettingStarted_7.6.0#Packaging

As best I can tell, this is a bug, but feel free to correct me if not.

johnyb commented 9 years ago

Only the last 2 problems, are actually valid for this project. Seems yo changed the API, I'm going to fix this.

The dist:source task is actually defined in https://github.com/Open-Xchange-Frontend/shared-grunt-config. Though, I'm not sure why it can't copy over the appserver module. It should not do so, anyway. This is, because the node_modules contains all the development modules, also.

The way to go, would be to run the task with a clean node_modules directory populated by npm install --production. Without the module grunt-contrib-compress being installed, the source directory would not be tar.gzipped, so this would need to be available, too (see the output of grunt). This would only generate the source tarballs, nothing more. It is not possible to build packages on OSX. In fact, it is only possible to create packages on the target system itself having the complete toolchain needed for packaging installed.

johnyb commented 9 years ago

FYI, concerning problem 1, there now is https://github.com/Open-Xchange-Frontend/shared-grunt-config/issues/2 - and I even got an idea, what is going on. A fix will ship soon(ish).

baggachipz commented 9 years ago

Great, much appreciated, thanks!