1

Recently i update my existing ember ember project to 2.10.0 version after update i try to run the project but it shows some compile error

uncaught Error: Compile Error: bs-form-element is not a helper

I include this in login page on my project like this

 <div class="panel-body">
                {{#bs-form formLayout="vertical" model=this action="loginAction" class="form-signin"}}
                    <fieldset>
                        {{bs-form-element controlType="text" placeholder="Bank ID" property="userid" value=userid elementId="userid" required="required" autofocus="autofocus" style="text-align:left" maxlength="7"}} 
                        {{bs-form-element controlType="password" placeholder="Password" property="password" value=password elementId="password" required="required" style="text-align:left" maxlength="10"}}
                        <!--div class="checkbox">
                            <label>
                                <input name="remember" type="checkbox" value="Remember Me">Remember Me
                            </label>
                        </div-->
                        {{bs-button defaultText="Login" class="btn btn-lg btn-primary btn-block" buttonType="submit" }}
                    </fieldset>
                {{/bs-form}}
            </div>

I am not sure whether this is plugin related issue or something could some one please help to sort this issue

wuarmin
  • 3,274
  • 3
  • 18
  • 31
Karthiga
  • 859
  • 2
  • 17
  • 33

2 Answers2

2

Ember throws this error if there is no component or helper with the given name found in your project or your dependent addon's.

Check your package.json and the version of ember-bootstrap. I think your app used pre 1.0, because bs-form-element is old api.

Maybe the addon was updated accidentally to >= 1.0, while updating ember.

wuarmin
  • 3,274
  • 3
  • 18
  • 31
  • yes as you said before update my old ember project version is 0.2.7 and my ember bootstrap version is 0.6.2 and my updated ember project version is 2.10.0 and my updated boostrap version is 2.4.0 . – Karthiga Jan 23 '19 at 05:31
  • so whats the way to solve thiis problem . I thought ember itself take care of this errors while updating but its not worked as expected. I am try to update ember version from 0.2.7 to 2.10.0 any idea whats the best way to update to this version – Karthiga Jan 23 '19 at 05:35
  • ember does not care about third party addons. ember just cares about framework specific addons. it's up to you if you use ember 2.10 with ember-bootstrap 0.2.7 or ember-bootstrap >= 1.0. you have to define it at package.json – wuarmin Jan 23 '19 at 07:55
0

Another possible oversight to check for, specific to ember-bootstrap and black/white lists, is accidentally including or excluding the needed component from the black/white lists. For example, if you're using a whitelist, make sure the needed component is referenced in it:

// ember-cli-build.js
'ember-bootstrap': {
    'whitelist': [
        'bs-form'
    ],
}
jabbascript
  • 345
  • 1
  • 6
  • 13