thom4parisot / grunt-crx

Grunt task used to package private Chrome Extensions.
https://npmjs.com/grunt-crx
MIT License
118 stars 21 forks source link

Build fails if we have bootstrap 3 in application #34

Closed kunalsynerzip closed 10 years ago

kunalsynerzip commented 10 years ago

I am developing a custom devtool extension which uses bootstrap 3 for UI stuff.

When I include bootstrap's css file to build a .crx for my extension, the grunt build commands never create it. If I remove .css files from the source then it compiles and create a crx.

Please help

thom4parisot commented 10 years ago

What is the output of the console if you run the grunt task with the --debug flag?

kunalsynerzip commented 10 years ago

I see the following line: Task source: /home/user/path/of/the/repo/node_modules/grunt-crx/tasks/crx.js

When I press cntrl+c after almost 2 min, I got following message: Execution Time (2014-06-17 20:21:58 UTC) concurrent:dist 4.1s ▇▇▇▇ 4% uglify:dist/libs/jQuery/jquery.js 3.4s ▇▇▇ 3% usemin:html 46.9s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 42% crx:myExtensionName 56.2s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 50%

thom4parisot commented 10 years ago

Do you have the same problem by running just grunt crx:myExtensionName?

kunalsynerzip commented 10 years ago

Yes, I do get the same result. Please find the o/p below.

grunt crx:myExtensionName Running "crx:myExtensionName" (crx) task ^C Execution Time (2014-06-18 09:38:16 UTC) crx:myExtensionName 132.1s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 100%

thom4parisot commented 10 years ago

Okay so I understand well, the compilation just hangs because some files are missing, right?

Could you run the same task using the --verbose flag so we could see what is the long running operation?

If it is not obvious I'll ask you to share a (private) gist with some code in order to let me reproduce the problem. Thanks very much :-)

kunalsynerzip commented 10 years ago

Following is the o/p for the mentioned command.

Initializing
Command-line options: --verbose

Reading "Gruntfile.js" Gruntfile...OK

Registering Gruntfile tasks.

Registering "grunt-bower-install" local Npm module tasks.
Reading /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-bower-install/package.json...OK
Parsing /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-bower-install/package.json...OK
Loading "bower-install.js" tasks...OK
+ bowerInstall

Registering "grunt-chrome-manifest" local Npm module tasks.
Reading /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-chrome-manifest/package.json...OK
Parsing /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-chrome-manifest/package.json...OK
Loading "chrome-manifest.js" tasks...OK
+ chromeManifest

Registering "grunt-concurrent" local Npm module tasks.
Reading /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-concurrent/package.json...OK
Parsing /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-concurrent/package.json...OK
Loading "concurrent.js" tasks...OK
+ concurrent

Registering "grunt-contrib-clean" local Npm module tasks.
Reading /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-contrib-clean/package.json...OK
Parsing /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-contrib-clean/package.json...OK
Loading "clean.js" tasks...OK
+ clean

Registering "grunt-contrib-compress" local Npm module tasks.
Reading /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-contrib-compress/package.json...OK
Parsing /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-contrib-compress/package.json...OK
Loading "compress.js" tasks...OK
+ compress

Registering "grunt-contrib-concat" local Npm module tasks.
Reading /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-contrib-concat/package.json...OK
Parsing /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-contrib-concat/package.json...OK
Loading "concat.js" tasks...OK
+ concat

Registering "grunt-contrib-connect" local Npm module tasks.
Reading /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-contrib-connect/package.json...OK
Parsing /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-contrib-connect/package.json...OK
Loading "connect.js" tasks...OK
+ connect

Registering "grunt-contrib-copy" local Npm module tasks.
Reading /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-contrib-copy/package.json...OK
Parsing /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-contrib-copy/package.json...OK
Loading "copy.js" tasks...OK
+ copy

Registering "grunt-contrib-cssmin" local Npm module tasks.
Reading /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-contrib-cssmin/package.json...OK
Parsing /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-contrib-cssmin/package.json...OK
Loading "cssmin.js" tasks...OK
+ cssmin

Registering "grunt-contrib-htmlmin" local Npm module tasks.
Reading /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-contrib-htmlmin/package.json...OK
Parsing /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-contrib-htmlmin/package.json...OK
Loading "htmlmin.js" tasks...OK
+ htmlmin

Registering "grunt-contrib-imagemin" local Npm module tasks.
Reading /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-contrib-imagemin/package.json...OK
Parsing /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-contrib-imagemin/package.json...OK
Loading "imagemin.js" tasks...OK
+ imagemin

Registering "grunt-contrib-jshint" local Npm module tasks.
Reading /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-contrib-jshint/package.json...OK
Parsing /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-contrib-jshint/package.json...OK
Loading "jshint.js" tasks...OK
+ jshint

Registering "grunt-contrib-uglify" local Npm module tasks.
Reading /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-contrib-uglify/package.json...OK
Parsing /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-contrib-uglify/package.json...OK
Loading "uglify.js" tasks...OK
+ uglify

Registering "grunt-contrib-watch" local Npm module tasks.
Reading /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-contrib-watch/package.json...OK
Parsing /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-contrib-watch/package.json...OK
Loading "watch.js" tasks...OK
+ watch

Registering "grunt-crx" local Npm module tasks.
Reading /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-crx/package.json...OK
Parsing /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-crx/package.json...OK
Loading "crx.js" tasks...OK
+ crx

Registering "grunt-mocha" local Npm module tasks.
Reading /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-mocha/package.json...OK
Parsing /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-mocha/package.json...OK
Growl not found, 'npm install growl' for Growl supportLoading "mocha.js" tasks...OK
+ mocha

Registering "grunt-svgmin" local Npm module tasks.
Reading /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-svgmin/package.json...OK
Parsing /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-svgmin/package.json...OK
Loading "svgmin.js" tasks...OK
+ svgmin

Registering "grunt-usemin" local Npm module tasks.
Reading /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-usemin/package.json...OK
Parsing /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-usemin/package.json...OK
Loading "usemin.js" tasks...OK
+ usemin, useminPrepare
Reading app/manifest.json...OK
Parsing app/manifest.json...OK
Reading app/manifest.json...OK
Parsing app/manifest.json...OK
Initializing config...OK
Loading "Gruntfile.js" tasks...OK
+ build, debug, default, test

Running tasks: crx

Running "crx" task

Running "crx:myExtensionName" (crx) task
Verifying property crx.myExtensionName exists in config...OK
Files: dist/ -> package/crx/
Reading /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-crx/lib/../data/config-default.json...OK
Parsing /home/userName/git/extension-repository/chrome-extension/node_modules/grunt-crx/lib/../data/config-default.json...OK
Reading myExtension.pem...OK
Reading dist/manifest.json...OK
Parsing dist/manifest.json...OK
Reading package.json...OK
Parsing package.json...OK
kunalsynerzip commented 10 years ago

Hi,

Any update over the issue, did you able to replicate it? If I can be of any help please do let me know.

Thanks in advance.

thom4parisot commented 10 years ago

Well @kunalsynerzip no I have not been able to act on it, there is not enough information in the trace, and I do not have any knowledge of the code you try to package so I am blind.

Please provide a (private) gist which would help me to reproduce the problem.

Thanks :-)

yuryoparin commented 10 years ago

Hi @kunalsynerzip and @oncletom. I've bumped into the same issue although I'm not using bootstrap. The bug I found is on the crx module's side. I created an issue here: https://github.com/jed/crx/issues/18. Basically, if you're using crx version > 0.4.1 and latest nodejs 0.10.29, you won't be able to create a "*.crx" archive. In that case, try to modify "crx.js" in the crx module's "src" folder and see if that helps.

kunalsynerzip commented 10 years ago

Hi @yuryoparin , Thanks for your insight over the issue. I have resolved the issue by re-installing the nodejs and respective grunt packages. Although, it was all together new system as my laptop was crashed and need to switch to new one.

thom4parisot commented 10 years ago

OK so do we agree to close that issue then? Unless something can be done here to prevent such an error.