GithubHelp home page GithubHelp logo

Comments (8)

omararturo avatar omararturo commented on June 4, 2024 3

Hi,
In found a solution that worked in my case:

My application worked perfectly in local mode.
But when he tried to make deploy appeared the following error:

Errors prevented bundling: 
While processing files with angular2-compilers (for target web.browser):
C:\tools\isobuild\compiler-plugin.js:698:15: 'data' option to addAsset must be a Buffer or String.

An error that really does not identify the cause, hopefully in the future we @barbatus provide some help.

When removing my application modules and keep trying one by one the modules arrive at the cause of the problem. In one of the modules he was importing a CSS style sheet that was empty

import template from './create.component.html';
import style from './create.component.scss';

@Component({
    selector: 'create',
    template,
    styles: [style]
})

The file "create.component.scss" existed but had not yet enwedged any code.

When I deleted the empty file "create.component.scss" and remove its relations with the component or add styles to file the problem was solved. I could perform perfectly deploy.

I hope it will be helpful to you.

from angular2-meteor.

derek-fong avatar derek-fong commented on June 4, 2024

+1

I am having the same issue when deploying my app to Ubuntu/Debian Linux with Meteor Up.

Works fine when using angular2-compilers@=0.6.1.

from angular2-meteor.

bergben avatar bergben commented on June 4, 2024

but then you can't use angular 2 final, @derek-fong right? There was another issue with angular2-compilers and angular2 final before version 0.6.3...

from angular2-meteor.

metalik avatar metalik commented on June 4, 2024

Got the same error when build at local machine as well:

Errors prevented bundling:
While processing files with angular2-compilers (for target web.browser):
C:\tools\isobuild\compiler-plugin.js:698:15: 'data' option to addAsset
must be a Buffer or String.
at ResourceSlot.addAsset (C:\tools\isobuild\compiler-plugin.js:698:15)
at InputFile.addAsset (C:\tools\isobuild\compiler-plugin.js:463:24)
at SassCompilerExtended.addCompileResult
(packages/barbatus:css-compiler/compilers/basic_compiler.js:32:15)
at packages/caching-compiler/multi-file-caching-compiler.js:144:14
at packages/caching-compiler/multi-file-caching-compiler.js:97:11
at C:\Users\XXX\AppData\Local\.meteor\packages\angular2-compilers\0.6.3\plugin.Angular2Compilers.os\npm\node_modules\meteor\caching-compiler\node_modules\async\lib\async.js:182:20
at replenish (C:\Users\XXX\AppData\Local\.meteor\packages\angular2-compilers\0.6.3\plugin.Angular2Compilers.os\npm\node_modules\meteor\caching-compiler\node_modules\async\lib\async.js:317:21)
at C:\Users\XXX\AppData\Local\.meteor\packages\angular2-compilers\0.6.3\plugin.Angular2Compilers.os\npm\node_modules\meteor\caching-compiler\node_modules\async\lib\async.js:328:15
at Object.async.forEachLimit.async.eachLimit (C:\Users\XXX\AppData\Local\.meteor\packages\angular2-compilers\0.6.3\plugin.Angular2Compilers.os\npm\node_modules\meteor\caching-compiler\node_modules\async\lib\async.js:221:35)
at SassCompilerExtended.processFilesForTarget
(packages/caching-compiler/multi-file-caching-compiler.js:95:11)
at _loop
(packages/barbatus:css-compiler/compilers/style_compiler.js:20:26)
at StyleCompiler.processFilesForTarget
(packages/barbatus:css-compiler/compilers/style_compiler.js:18:36)

from angular2-meteor.

derek-fong avatar derek-fong commented on June 4, 2024

@bergben yes you are right but I have no choice but rollback to angular2-compilers@=0.6.1 until is issues is resolved.

Update: angular2-compilers@=0.6.1 works with @angular 2.1.0 on Mac and Linux but deployment still fails with the same error mentioned if using angular2-compilers 0.6.3. Here is my package.json

  "dependencies": {
    "@angular/common": "2.1.0",
    "@angular/compiler": "2.1.0",
    "@angular/core": "2.1.0",
    "@angular/forms": "2.1.0",
    "@angular/platform-browser": "2.1.0",
    "@angular/platform-browser-dynamic": "2.1.0",
    "@angular/router": "3.1.0",
    "angular2-meteor": "0.7.0",
    "angular2-meteor-polyfills": "0.1.1",
    "angular2-moment": "1.0.0-beta.5",
    "babyparse": "0.4.6",
    "es6-shim": "0.35.1",
    "meteor-node-stubs": "0.2.3",
    "meteor-rxjs": "0.3.0",
    "reflect-metadata": "0.1.8",
    "rxjs": "5.0.0-beta.12",
    "zone.js": "0.6.25"
  }

from angular2-meteor.

bergben avatar bergben commented on June 4, 2024

Should I reopen this issue in the current moved repo? Seems like this repo is not actively followed anymore?

from angular2-meteor.

barbatus avatar barbatus commented on June 4, 2024

@bergben does it work fine if you run meteor run --production or the same?
(Sorry for long delay)

from angular2-meteor.

bergben avatar bergben commented on June 4, 2024

No worries @barbatus, I know you guys got a lot on your minds, just keep up the great work 👍
The problem also exists using meteor run --production.

Thank you very much for posting your findings here @omararturo. I can confirm this. After adding a css rule in every single style sheet used, the deployment works like a charm.

So to reproduce this issue you simply have to add a completely empty stylesheet to a component and run meteor in production mode.

I suppose this is only an issue during deployment on a server as I am deploying constantly to Heroku during deployment. So it's not that big of a deal for most use cases.

from angular2-meteor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.