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

Support Ember version 4.x #81

Closed
stefanhofmann2 opened this issue Jan 30, 2022 · 8 comments
Closed

Support Ember version 4.x #81

stefanhofmann2 opened this issue Jan 30, 2022 · 8 comments

Comments

@stefanhofmann2
Copy link

Using Ember version 4.1.1 in combination with ember-eui version 1.6 i get the following error:
reference error Ember is not defined. The error occurs in
define("@html-next/vertical-collection/components/vertical-collection/template", ["exports"], function (_exports) {
"use strict";

Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.default = void 0;

var _default = Ember.HTMLBars.template({
"id": "BlT5dpw+",
"block": "[[[42,[28,[37,1],[[28,[37,1],[[30,0,["virtualComponents"]]],null]],null],"id",[[[1,[28,[35,2],[[30,1,["upperBound"]]],null]],[41,[30,1,["isOccludedContent"]],[[[2,[28,[37,2],[[30,1,["element"]]],null]]],[]],[[[18,2,[[30,1,["content"]],[30,1,["index"]]]]],[]]],[1,[28,[35,2],[[30,1,["lowerBound"]]],null]]],[1]],null],[1,"\n"],[41,[30,0,["shouldYieldToInverse"]],[[[1," "],[18,3,null],[1,"\n"]],[]],null]],["virtualComponent","&default","&else"],false,["each","-track-array","unbound","if","yield"]]",
"moduleName": "@html-next/vertical-collection/components/vertical-collection/template.hbs",
"isStrictMode": false
});
I am working on Windows 10 with nodejs version 16.13.
_exports.default = _default;
});

@betocantu93
Copy link
Collaborator

betocantu93 commented Feb 2, 2022

Hello @stefanhofmann2 ! Thanks for opening this issue. I'll check this out soon enough.

Are you using embroider?

If so, could you try adding the flag to the ember-svg-jar hbs strategy?

bundle: true

@betocantu93
Copy link
Collaborator

Already some work going on #82

@amiarSlimane
Copy link

amiarSlimane commented Feb 15, 2022

Hello , for me i am getting the following error after installing ember-eui , my ember version is 4.1.0

Build Error (broccoli-persistent-filter:Babel > [Babel: @embroider/macros]) in @embroider/macros/runtime.js

/home/amiar/makane/promotion/admin-front/@embroider/macros/runtime.js: @babel/template placeholder "APP": Expected string substitution


Stack Trace and Error Report: /tmp/error.dump.858ad946bd20c92d54702d2f912a0283.log

ERROR Summary:

  - broccoliBuilderErrorStack: Error: @babel/template placeholder "APP": Expected string substitution
    at applyReplacement (/home/amiar/makane/promotion/admin-front/node_modules/@babel/template/lib/populate.js:74:13)
    at /home/amiar/makane/promotion/admin-front/node_modules/@babel/template/lib/populate.js:44:7
    at Array.forEach (<anonymous>)
    at populatePlaceholders (/home/amiar/makane/promotion/admin-front/node_modules/@babel/template/lib/populate.js:42:43)
    at /home/amiar/makane/promotion/admin-front/node_modules/@babel/template/lib/string.js:20:51
    at /home/amiar/makane/promotion/admin-front/node_modules/@babel/template/lib/builder.js:75:14
    at Object.buildLiterals (/home/amiar/makane/promotion/admin-front/node_modules/@embroider/util/node_modules/@embroider/macros/src/babel/evaluate-json.js:377:73)
    at Object.inlineRuntimeConfig (/home/amiar/makane/promotion/admin-front/node_modules/@embroider/util/node_modules/@embroider/macros/src/babel/get-config.js:107:55)
    at PluginPass.enter (/home/amiar/makane/promotion/admin-front/node_modules/@embroider/util/node_modules/@embroider/macros/src/babel/macros-babel-plugin.js:77:38)
    at newFn (/home/amiar/makane/promotion/admin-front/node_modules/@babel/traverse/lib/visitors.js:177:21)
    =============
    at Object.buildLiterals (/home/amiar/makane/promotion/admin-front/node_modules/@embroider/util/node_modules/@embroider/macros/src/babel/evaluate-json.js:377:34)
    at Object.inlineRuntimeConfig (/home/amiar/makane/promotion/admin-front/node_modules/@embroider/util/node_modules/@embroider/macros/src/babel/get-config.js:107:55)
    at PluginPass.enter (/home/amiar/makane/promotion/admin-front/node_modules/@embroider/util/node_modules/@embroider/macros/src/babel/macros-babel-plugin.js:77:38)
    at newFn (/home/amiar/makane/promotion/admin-front/node_modules/@babel/traverse/lib/visitors.js:177:21)
    at NodePath._call (/home/amiar/makane/promotion/admin-front/node_modules/@babel/traverse/lib/path/context.js:53:20)
    at NodePath.call (/home/amiar/makane/promotion/admin-front/node_modules/@babel/traverse/lib/path/context.js:40:17)
    at NodePath.visit (/home/amiar/makane/promotion/admin-front/node_modules/@babel/traverse/lib/path/context.js:100:31)
    at TraversalContext.visitQueue (/home/amiar/makane/promotion/admin-front/node_modules/@babel/traverse/lib/context.js:103:16)
  - code: [undefined]
  - codeFrame: /home/amiar/makane/promotion/admin-front/@embroider/macros/runtime.js: @babel/template placeholder "APP": Expected string substitution
  - errorMessage: @embroider/macros/runtime.js: /home/amiar/makane/promotion/admin-front/@embroider/macros/runtime.js: @babel/template placeholder "APP": Expected string substitution
        in /tmp/broccoli-688155C6oAL8SnJj3s/out-150-funnel_funnel_embroider_macros_addon
        at broccoli-persistent-filter:Babel > [Babel: @embroider/macros] (Babel: @embroider/macros)
  - errorType: Build Error
  - location:
    - column: [undefined]
    - file: @embroider/macros/runtime.js
    - line: [undefined]
    - treeDir: /tmp/broccoli-688155C6oAL8SnJj3s/out-150-funnel_funnel_embroider_macros_addon
  - message: @embroider/macros/runtime.js: /home/amiar/makane/promotion/admin-front/@embroider/macros/runtime.js: @babel/template placeholder "APP": Expected string substitution
        in /tmp/broccoli-688155C6oAL8SnJj3s/out-150-funnel_funnel_embroider_macros_addon
        at broccoli-persistent-filter:Babel > [Babel: @embroider/macros] (Babel: @embroider/macros)
  - name: Error
  - nodeAnnotation: Babel: @embroider/macros
  - nodeName: broccoli-persistent-filter:Babel > [Babel: @embroider/macros]
  - originalErrorMessage: /home/amiar/makane/promotion/admin-front/@embroider/macros/runtime.js: @babel/template placeholder "APP": Expected string substitution
  - stack: Error: @babel/template placeholder "APP": Expected string substitution
    at applyReplacement (/home/amiar/makane/promotion/admin-front/node_modules/@babel/template/lib/populate.js:74:13)
    at /home/amiar/makane/promotion/admin-front/node_modules/@babel/template/lib/populate.js:44:7
    at Array.forEach (<anonymous>)
    at populatePlaceholders (/home/amiar/makane/promotion/admin-front/node_modules/@babel/template/lib/populate.js:42:43)
    at /home/amiar/makane/promotion/admin-front/node_modules/@babel/template/lib/string.js:20:51
    at /home/amiar/makane/promotion/admin-front/node_modules/@babel/template/lib/builder.js:75:14
    at Object.buildLiterals (/home/amiar/makane/promotion/admin-front/node_modules/@embroider/util/node_modules/@embroider/macros/src/babel/evaluate-json.js:377:73)
    at Object.inlineRuntimeConfig (/home/amiar/makane/promotion/admin-front/node_modules/@embroider/util/node_modules/@embroider/macros/src/babel/get-config.js:107:55)
    at PluginPass.enter (/home/amiar/makane/promotion/admin-front/node_modules/@embroider/util/node_modules/@embroider/macros/src/babel/macros-babel-plugin.js:77:38)
    at newFn (/home/amiar/makane/promotion/admin-front/node_modules/@babel/traverse/lib/visitors.js:177:21)
    =============
    at Object.buildLiterals (/home/amiar/makane/promotion/admin-front/node_modules/@embroider/util/node_modules/@embroider/macros/src/babel/evaluate-json.js:377:34)
    at Object.inlineRuntimeConfig (/home/amiar/makane/promotion/admin-front/node_modules/@embroider/util/node_modules/@embroider/macros/src/babel/get-config.js:107:55)
    at PluginPass.enter (/home/amiar/makane/promotion/admin-front/node_modules/@embroider/util/node_modules/@embroider/macros/src/babel/macros-babel-plugin.js:77:38)
    at newFn (/home/amiar/makane/promotion/admin-front/node_modules/@babel/traverse/lib/visitors.js:177:21)
    at NodePath._call (/home/amiar/makane/promotion/admin-front/node_modules/@babel/traverse/lib/path/context.js:53:20)
    at NodePath.call (/home/amiar/makane/promotion/admin-front/node_modules/@babel/traverse/lib/path/context.js:40:17)
    at NodePath.visit (/home/amiar/makane/promotion/admin-front/node_modules/@babel/traverse/lib/path/context.js:100:31)
    at TraversalContext.visitQueue (/home/amiar/makane/promotion/admin-front/node_modules/@babel/traverse/lib/context.js:103:16)

=================================================================================

@betocantu93
Copy link
Collaborator

betocantu93 commented Feb 16, 2022

Hello @amiarSlimane it seems the issue is related to embroider versions miss matches which is not related to ember-eui but with dependencies like ember power select, but please refer to the installation instructions for a monkey patch in the demo https://ember-eui.netlify.app/docs/installation

Eventually this won't be needed.

@amiarSlimane
Copy link

amiarSlimane commented Feb 16, 2022

Thank you , i have used "override dependencies" as mentioned in the doc with a new fresh ember project ,

"overrides": {
    "@embroider/macros": "^1.0.0",
    "@embroider/shared-internals": "^1.0.0",
    "@embroider/util": "^1.0.0"
  }

it is building successfully without errors, but i get the following error in the web browser console :

Uncaught ReferenceError: Ember is not defined
    <anonymous> template.js:9
    exports loader.js:106
    _reify loader.js:143
    reify loader.js:130
    exports loader.js:104
    _reify loader.js:143
    reify loader.js:130
    exports loader.js:104
    _reify loader.js:143
    reify loader.js:130
    exports loader.js:104
    requireModule loader.js:27
    r loader.js:176
    Ember 3
    <anonymous> app.js:26
    exports loader.js:106
    requireModule loader.js:27
    <anonymous> Ember

The error is in this line
var _default = Ember.HTMLBars.template({

define("@html-next/vertical-collection/components/vertical-collection/template", ["exports"], function (_exports) {
  "use strict";

  Object.defineProperty(_exports, "__esModule", {
    value: true
  });
  _exports.default = void 0;

  var _default = Ember.HTMLBars.template({
    "id": "BlT5dpw+",
    "block": "[[[42,[28,[37,1],[[28,[37,1],[[30,0,[\"virtualComponents\"]]],null]],null],\"id\",[[[1,[28,[35,2],[[30,1,[\"upperBound\"]]],null]],[41,[30,1,[\"isOccludedContent\"]],[[[2,[28,[37,2],[[30,1,[\"element\"]]],null]]],[]],[[[18,2,[[30,1,[\"content\"]],[30,1,[\"index\"]]]]],[]]],[1,[28,[35,2],[[30,1,[\"lowerBound\"]]],null]]],[1]],null],[1,\"\\n\"],[41,[30,0,[\"shouldYieldToInverse\"]],[[[1,\"  \"],[18,3,null],[1,\"\\n\"]],[]],null]],[\"virtualComponent\",\"&default\",\"&else\"],false,[\"each\",\"-track-array\",\"unbound\",\"if\",\"yield\"]]",
    "moduleName": "@html-next/vertical-collection/components/vertical-collection/template.hbs",
    "isStrictMode": false
  });

  _exports.default = _default;
});

@betocantu93
Copy link
Collaborator

betocantu93 commented Feb 18, 2022

@stefanhofmann2 @amiarSlimane new version released, it should now work with ember >v4.x.x , can you please confirm?

We had to depend on html-next/vertical-collection#v3.0.0-0 in order to make it work ref, we should update this when they make a new stable release

@amiarSlimane
Copy link

Thank you @betocantu93 it is working.

@betocantu93
Copy link
Collaborator

@amiarSlimane great!

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

3 participants