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

A helper named 'x-toggle' could not be found #33

Closed
bj-mcduck opened this issue Jul 20, 2015 · 35 comments
Closed

A helper named 'x-toggle' could not be found #33

bj-mcduck opened this issue Jul 20, 2015 · 35 comments

Comments

@bj-mcduck
Copy link

I can't use the component as it seems to make the page fail with A helper named 'x-toggle' could not be found.

I can add a stack trace if needed. I ran rm -rf node_modules bower_components, then re-ran npm install && bower install.

I'm on Ember 1.13.5, EmberData 1.13.5.

@knownasilya
Copy link
Owner

What version of Ember-CLI?

@knownasilya
Copy link
Owner

Give the latest version a try please. Thanks.

@awwester
Copy link

@brandonjmckay I'm on 1.13.5/1.13.5 of ember and ember-data and worked for me seamlessly on ember-cli 1.13.1

@knownasilya
Copy link
Owner

@awwester you tried the latest version or the one before that?

@bj-mcduck
Copy link
Author

I'll double check which version of cli it is.

@awwester
Copy link

@knownasilya Nope, I have only just picked up this package today and have only used this version set

@knownasilya
Copy link
Owner

I just released a new version, give that a try.

@bj-mcduck
Copy link
Author

Will do.

@gte451f
Copy link

gte451f commented Jul 28, 2015

Hi Ilya,
I'm running into the same problem.

I thought perhaps updating the package version & rebuilding my project would help:
package.json....

    "ember-cli-toggle": "0.5.11",

followed by....

    rm -rf node_modules bower_components dist tmp
    npm cache clean
    bower cache clean
    npm install
    bower install

Didn't seem to make a difference.

I'm on Ember CLI 1.3.1

update Also tested on a 2nd app that suffers from the same error.

@dgavey
Copy link

dgavey commented Jul 28, 2015

Us as well. We are on Ember CLI 0.2.7 and have been using version 0.5.6 up to 0.5.8 however 0.5.9 and up gives us the same error as above.

@knownasilya
Copy link
Owner

0.5.9-0.5.10 were bad releases. Does 0.5.11 work for anyone?

@sir-dunxalot
Copy link

I just upgraded to 0.5.11 and am seeing the same issue. Ember 1.13.5.

@gte451f
Copy link

gte451f commented Jul 29, 2015

0.5.11 exhibits this error on my apps using the latest ember CLI release

@knownasilya
Copy link
Owner

Ok, I just did the following:

ember new hello
ember install ember-cli-toggle
ember g controller application
# add `{{x-toggle toggle='startCar'}}` to templates/application.hbs
# add `startCar` action to controllers/application.js
npm start

And everything worked fine. I'm using ember-cli 1.13.1 and ember-cli-toggle 0.5.11.

@knownasilya
Copy link
Owner

Can someone create a repo that reproduces this issue? That would help immensely.

I can push up the test project if that would help anyone.

@gte451f
Copy link

gte451f commented Aug 5, 2015

I've confirmed that a fresh install works as @knownasilya previously mentioned.
Will try again w/ my local apps and link to a broken example if I'm still not able to get it working.

@gte451f
Copy link

gte451f commented Aug 6, 2015

Here is a link to an Ember CLI app that does not work.
https://github.com/gte451f/smores-mgr

There are a couple of caveats...

  1. It normally requires a backing API, just go to the test route and you should avoid API calls http://localhost:4200/test
  2. There is a wrinkle in the install mentioned in the readme

@knownasilya
Copy link
Owner

@rwjblue @stefanpenner any ideas what the issue might be here? I'm at a loss.

@bj-mcduck
Copy link
Author

Just tried again on a new app, and getting this still.

@knownasilya
Copy link
Owner

What is it that you guys are doing that's causing this? I'm going to try to setup a test repo with the working version.

@bj-mcduck
Copy link
Author

If I explicitly import this in my app, and re-export it it works fine.

@bj-mcduck
Copy link
Author

Must be something to do with how it is exporting it into the app.

@knownasilya
Copy link
Owner

Maybe something to do with the version of Ember CLI?

@iterpugov
Copy link

Same for me. Ember CLI version 1.13.1
Not sure, if it help, but checked built assets/app-name.js file.

Other installed components usually has name 'app-name/components/component-name' such as

define('app-name/components/x-select', ...

but x-toggle is defined as

define('app-name/components/x-toggle/component', ...

@knownasilya
Copy link
Owner

Sounds like certain versions of ember-cli don't support the syntax where the template is in the addon directory. @rwjblue could that be an issue with some versions of the CLI?

@knownasilya
Copy link
Owner

@stefanpenner any thoughts on this issue?

@stefanpenner
Copy link

@knownasilya i need a reproduction to investigate,

the above provided one seems to be hitting some less issue, running out of memory.

<--- Last few GCs --->

   91802 ms: Scavenge 1395.6 (1457.6) -> 1395.6 (1457.6) MB, 89.1 / 0 ms (+ 2.9 ms in 1 steps since last GC) [allocation failure] [incremental marking delaying mark-sweep].
   93491 ms: Mark-sweep 1395.6 (1457.6) -> 1395.6 (1457.6) MB, 1689.6 / 0 ms (+ 3.9 ms in 2 steps since start of marking, biggest step 2.9 ms) [last resort gc].
   95210 ms: Mark-sweep 1395.6 (1457.6) -> 1395.1 (1457.6) MB, 1718.4 / 0 ms [last resort gc].


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x2ae856ee3ac1 <JS Object>
    1: eval [/Users/stefanpenner/tmp/smores-mgr/node_modules/less/lib/less/tree/ruleset.js:~31] [pc=0x1be21874005b] (this=0x160681d653a9 <JS Object>,context=0x1acf5a8c7419 <JS Object>)
    2: eval [/Users/stefanpenner/tmp/smores-mgr/node_modules/less/lib/less/tree/ruleset.js:~31] [pc=0x1be217cf0242] (this=0x1acf5a8c7631 <JS Object>,context=0x1acf5a8c7419 <JS Object>)
    3: evalCall [/Users/ste...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
fish: 'ember s' terminated by signal SIGABRT (Abort)

@stefanpenner
Copy link

^^ doesn't seem to describe the issue here, so I believe it to be orthogonal and maybe something with less? Anyways, if someone provides a reproduction (that works), i'll dig in.

@knownasilya
Copy link
Owner

Closing this until someone can produce a clean reproduction.

@ashishtajane
Copy link

I ran into this problem just now. Then I created a fresh repo with just this addon installed and it was still not working.
Repo link - https://github.com/ashishtajane/ember-toggle

After that, I shuffled the addon files a bit and was able to make it work. So I have added those files also in above repo (in node_modules/ember-cli-toggle folder)

Here is how the final addon folder looks (in working condition)..
ember-toggle

@knownasilya
Copy link
Owner

Are you by any chance using podModulePrefix? And what version of ember-cli and addon?

@ashishtajane
Copy link

I literally just did this

ember new ember-toggle
cd ember-toggle
ember install ember-cli-toggle
# add to application.hbs following line
# {{x-toggle value=someValue}}

ember-cli version is 2.3.0-beta.1
addon version is 0.6.0

@knownasilya
Copy link
Owner

Can you give v0.6.1 a try?

@knownasilya knownasilya reopened this Feb 19, 2016
@ashishtajane
Copy link

Works!
Thanks 👍

Although there seems to be another issue with CSS. The theme files are not getting imported correctly I think. Because only default theme was visible for me. Then I manually copied css of a theme (ios) to my app.css and that theme became visible. Same with rest of them.

@knownasilya
Copy link
Owner

See if #38 helps

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

No branches or pull requests

9 participants