Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken with latest ember-cli (2.4.0) #121

Closed
holandes22 opened this issue Mar 1, 2016 · 27 comments
Closed

Broken with latest ember-cli (2.4.0) #121

holandes22 opened this issue Mar 1, 2016 · 27 comments

Comments

@holandes22
Copy link

After upgrading to ember-cli and ember 2.4.0 I started getting this error, preventing the build to run:

this.vendorStaticStyles.concat is not a function
TypeError: this.vendorStaticStyles.concat is not a function
    at EmberApp.styles (/home/pablo/projects/kube-admin/node_modules/ember-component-css/index.js:85:43)
    at EmberApp.toArray (/home/pablo/projects/kube-admin/node_modules/ember-cli/lib/broccoli/ember-app.js:1493:10)
    at EmberApp.toTree (/home/pablo/projects/kube-admin/node_modules/ember-cli/lib/broccoli/ember-app.js:1514:30)
    at module.exports (/home/pablo/projects/kube-admin/ember-cli-build.js:25:14)
    at Class.module.exports.Task.extend.setupBroccoliBuilder (/home/pablo/projects/kube-admin/node_modules/ember-cli/lib/models/builder.js:55:19)
    at Class.module.exports.Task.extend.init (/home/pablo/projects/kube-admin/node_modules/ember-cli/lib/models/builder.js:89:10)
    at new Class (/home/pablo/projects/kube-admin/node_modules/ember-cli/node_modules/core-object/core-object.js:18:12)
    at Class.module.exports.Task.extend.run (/home/pablo/projects/kube-admin/node_modules/ember-cli/lib/tasks/serve.js:15:19)
    at /home/pablo/projects/kube-admin/node_modules/ember-cli/lib/commands/serve.js:70:22
    at lib$rsvp$$internal$$tryCatch (/home/pablo/projects/kube-admin/node_modules/rsvp/dist/rsvp.js:493:16)

If I change line 82 at index.js to this

inputFiles: this.vendorStaticStyles['/assets/vendor.css'].concat(['vendor/addons.css']),

then is working again. I'm preparing a PR for this

Apparently the structure of this.vendorStaticStyles changed. Is this private API?

@nanuxbe
Copy link

nanuxbe commented Mar 1, 2016

+1 same error, same fix works (except it's on line 85 not 82)

@Exelord
Copy link

Exelord commented Mar 1, 2016

+1

@shillbom
Copy link

shillbom commented Mar 1, 2016

This does not work for me on a new empty project.

For me this.vendorStaticStyles == {} so I get the following error:
Cannot read property 'concat' of undefined

Have i configured something wrong?

backspace added a commit to backspace/ember-component-css that referenced this issue Mar 1, 2016
@cesarizu
Copy link

cesarizu commented Mar 1, 2016

The original method was changed considerably here: ember-cli/ember-cli@e78de54#diff-392bb207fea8bcbeb4a084bb445f7cc7R1170

@webark
Copy link
Owner

webark commented Mar 1, 2016

Ya. I feel that it's sad to say that this project is defunct.. :( Anyone have any luck with any other projects?

@holandes22
Copy link
Author

Just an update: ember-cli 2.4.1 was released reverting the changes. It now builds for me, but the vendor.css comes empty if I use this addon.

holandes22 added a commit to holandes22/kube-admin that referenced this issue Mar 2, 2016
    - This fixes a problem with non ascii files
      being corrupted (fonts in our case)
    - Removed ember-component-css addon as it was
      causing the vendor.css file to be empty
      see webark/ember-component-css#121
@shillbom
Copy link

shillbom commented Mar 2, 2016

@holandes22 Do you get the same issue if you run with sass? I could never get the plugin to work without it.

I guess there would be no problem updating to 2.4.1? We are aiming for the LTS release as soon as we can get it?

Sorry if this is the wrong place to discuss this!

@holandes22
Copy link
Author

@killbom yes, happens with sass. I never tried it with less or plain css actually

My two cents: I think targeting the 2.4 LTS is the right approach as that is exactly the intention of LTS releases.

Just a heads up, ember-cli 2.4.1 throws a deprecation warning when using vendorStaticStyles as it is deprecated API

@cibernox
Copy link
Contributor

cibernox commented Mar 2, 2016

@webark I migrated from this to ember-css-modules yesterday. I won't say it is a perfect solution, but I do like the approach and I find it more flexible than css components.

@ebryn
Copy link
Collaborator

ebryn commented Mar 2, 2016

I just tested the addon in Ember-CLI 2.4.1 and it seems to work fine. Looking into #114.

@ebryn ebryn closed this as completed Mar 2, 2016
@timgthomas
Copy link

@ebryn The build error is fixed with 2.4.1, true, but as @holandes22 mentioned, the vendor.css is now empty.

@ebryn
Copy link
Collaborator

ebryn commented Mar 2, 2016

I'm not seeing vendor.css being empty on my end, appears to be working
fine...

On Wed, Mar 2, 2016 at 1:06 PM, Tim G. Thomas notifications@github.com
wrote:

@ebryn https://github.com/ebryn The build error is fixed with 2.4.1,
true, but as @holandes22 https://github.com/holandes22 mentioned, the
vendor.css is now empty.


Reply to this email directly or view it on GitHub
#121 (comment)
.

@webark
Copy link
Owner

webark commented Mar 3, 2016

I"m seeing vendor.css being empty on my end.. are you using a pre complier..?

@ebryn
Copy link
Collaborator

ebryn commented Mar 4, 2016

No, I'm not using a preprocessor. Are you?

@webark
Copy link
Owner

webark commented Mar 4, 2016

ya

@t4t5
Copy link

t4t5 commented Mar 8, 2016

I have files missing in my vendor.css as well. Not sure what's causing it though. I'm using the Stylus preprocessor btw (if that has anything to do with it).

The odd thing is that the CSS files from this project are added to vendor.css with no problem, but the ones from this addon are completely omitted after the update to Ember CLI 2.4.1. :/

Before the update: (Both the ivy-codemirror and ember-blur-up css is imported)
screen shot 2016-03-08 at 14 55 20

After the update: (Only the ember-blur-up css is imported)
screen shot 2016-03-08 at 15 03 03

@t4t5
Copy link

t4t5 commented Mar 8, 2016

It also omits CSS that is imported directly through the ember-cli-build.js-file.

app.import('bower_components/sweetalert/dist/sweetalert.css');

...never shows up in vendor.css for example.

@ankushdharkar
Copy link
Contributor

+1

I am facing the same problem as @t4t5

May have something to do with these changes in 2.4.0: ember-cli/ember-cli#5545

I am using an ember-cli-sass preprocessor. This is the error I get on running ember server:

version: 2.4.0
this.vendorStaticStyles.concat is not a function
TypeError: this.vendorStaticStyles.concat is not a function
    at EmberApp.styles (<Project-Destination>/node_modules/ember-component-css/index.js:85:43)
    at EmberApp.toArray (<Project-Destination>/node_modules/ember-cli/lib/broccoli/ember-app.js:1493:10)
    at EmberApp.toTree (<Project-Destination>/node_modules/ember-cli/lib/broccoli/ember-app.js:1514:30)
    at module.exports (<Project-Destination>/ember-cli-build.js:144:14)
    at Class.module.exports.Task.extend.setupBroccoliBuilder (<Project-Destination>/node_modules/ember-cli/lib/models/builder.js:55:19)
    at Class.module.exports.Task.extend.init (<Project-Destination>/node_modules/ember-cli/lib/models/builder.js:89:10)
    at new Class (<Project-Destination>/node_modules/core-object/core-object.js:18:12)
    at Class.module.exports.Task.extend.run (<Project-Destination>/node_modules/ember-cli/lib/tasks/serve.js:15:19)
    at <Project-Destination>/node_modules/ember-cli/lib/commands/serve.js:70:22
    at lib$rsvp$$internal$$tryCatch (<Project-Destination>/node_modules/rsvp/dist/rsvp.js:493:16)

@backspace
Copy link

@ankushdharkar, what if you try Ember CLI 2.4.1?

@ankushdharkar
Copy link
Contributor

@backspace : That breaks too

@backspace
Copy link

Hmm, strange, that fixed it for me with ember-cli-sass.

@ankushdharkar
Copy link
Contributor

@backspace: Just tried it again. It didn't work.

@ebryn
Copy link
Collaborator

ebryn commented Mar 22, 2016

Please give our newly released 0.2.0-beta.1 release a shot and let us know if that solves this issue for you.

@ankushdharkar
Copy link
Contributor

@ebryn: 0.2.0-beta.1 is working. Thank you!

@barneycarroll
Copy link
Contributor

barneycarroll commented Jun 23, 2016

Hello, just upgraded the Ember core toolchain to 2.4(.3), and vendor.css started coming out empty as others mentioned. Like many others, I'm using ember-cli-sass (5.3.1)

Upgrading ember-component-sass to 0.2.0 betas 1, 2, 3, 4, 5 and 6 reinstates vendor.css output but results in generated components no longer producing classNames corresponding with the generated styles.

@holandes22 did you manage to get your 2.4 SASS + pod styles working? Did it require any manual configuration changes?

@webark
Copy link
Owner

webark commented Jun 23, 2016

@barneycarroll did you try upgrading to the latest beta version?

@barneycarroll
Copy link
Contributor

@webark yeah, no luck. The reason for this is due to my app having a slightly unorthodox pod file system hierarchy, in combination with brittle logic matching classNames at build and run time. Proposed a fork #151.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests