ember-component-css icon indicating copy to clipboard operation
ember-component-css copied to clipboard

styleNamespace empty string when using in both an app and addon

Open Skwai opened this issue 6 years ago • 7 comments

Currently get styleNamespace as a blank string for components when using ember-component-css in both an addon of ours and the main application

Skwai avatar Oct 10 '18 23:10 Skwai

@skwai this probably is a known issue.. :/ you could try the experimental tag, or the actively developed branch in #300

webark avatar Oct 11 '18 05:10 webark

@webark I am facing the same issue. Can you please let me know when do you have plan to fix this in normal release?

sunasra avatar Feb 01 '19 10:02 sunasra

@sunasra the plan is in place, but I am unable to set a firm timeline for when it will be in a stable release. I'm very sorry that this issue is around :( Through using peerDependecies, and version consistency, you are able to mitigate the issue, though that is a very less then ideal way to solve this issue. I'm sorry for the inconvenience.. :(

webark avatar Feb 01 '19 18:02 webark

@webark Thanks for your kind reply. I have tried installing experimental package but faced some minor issues. I am not sure how I can use peerDependecies with exact version. I read that peerDependecies does not automatically install with npm install command.

To unblock my team, for now I have build addon package without ember-component-css

sunasra avatar Feb 05 '19 05:02 sunasra

this started happening to me today, i'm not sure i understand what to make of it...

this new component has no styleNamespace...

but this one does...

ariesshrimp avatar Apr 29 '19 23:04 ariesshrimp

@Skwai @joefraley please try this with the latest 0.6.9 version and see if that fixes your issue. All your addons and app should be to this version or higher.

webark avatar May 23 '19 07:05 webark

Have an addon (by ember-engines) with v0.7.4 and tagless component.

styleNamespace is empty string if I don't have component.js file like in @joefraley case.

If I create "empty" file component.js:

import Component from '@ember/component';
import layout from './template';

export default Component.extend({
  tagName: '',
  layout
});

styleNamespace starts to work.

akaravashkin avatar Jan 10 '20 12:01 akaravashkin