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

fin-hypergrid not working #31

Open
Tenvan opened this issue May 23, 2017 · 4 comments
Open

fin-hypergrid not working #31

Tenvan opened this issue May 23, 2017 · 4 comments

Comments

@Tenvan
Copy link

Tenvan commented May 23, 2017

hi,
last beta working well with covalent, now i get the next problem.
i try to migrate our app from angular-cli to fuse-box, and now make the naxt library trouble: fin-hypergrid

bundling work, here the result:

└── default (0 files,  53 Bytes)
└── fusebox-hot-reload (1 files) 1.8 kB
└── fusebox-websocket (1 files) 2.9 kB
└── events (1 files) 9.8 kB
└── core-js (81 files) 57.1 kB
└── zone.js (1 files) 92.2 kB
└── @angular/platform-browser-dynamic (1 files) 6.7 kB
└── @angular/compiler (1 files) 973.1 kB
└── @angular/core (1 files) 460.5 kB
└── rxjs (95 files) 217.6 kB
└── @angular/common (1 files) 129 kB
└── @angular/platform-browser (2 files) 155.3 kB
└── @angular/forms (1 files) 202.4 kB
└── @angular/material (1 files) 870.6 kB
└── @angular/animations (2 files) 119.9 kB
└── @angular/http (1 files) 74 kB
└── http (1 files) 288 Bytes
└── lodash (1 files) 527.1 kB
└── fin-hypergrid (76 files) 640.8 kB
└── finbars (1 files) 33.8 kB
└── css-injector (1 files) 2.7 kB
└── rectangular (1 files) 109 Bytes
└── object-iterators (1 files) 10.3 kB
└── inject-stylesheet-template (1 files) 2.7 kB
└── automat (1 files) 5.7 kB
└── extend-me (1 files) 7.1 kB
└── overrider (1 files) 3 kB
└── sparse-boolean-array (1 files) 13.9 kB
└── fin-hypergrid-data-source-base (1 files) 8.6 kB
└── mustache (1 files) 19 kB
└── pop-menu (1 files) 12.4 kB
└── @covalent/core (18 files) 388.9 kB
└── @angular/[email protected] (1 files) 761.9 kB
└── @angular/[email protected] (1 files) 155.6 kB
└── @angular/router (1 files) 210.9 kB

    Size: 6 MB in 3s 450ms
└── default (11 files,  39.7 kB)
      main.js
      main.scss
      app.module.js
      app.component.js
      todo/todo-filter.pipe.js
      todo/todo-item.component.js
      todo/todo.model.js
      todo/todo-item.component.html
      todo/todo-list.component.js
      todo/todo.service.js
      todo/todo-list.component.html

but now this error:

Connecting to fusebox HMR at ws://localhost:4445
vendor.js:111229 Uncaught TypeError: Cannot read property 'Point' of undefined
    at Number.<anonymous> (vendor.js:111229)
    at c (vendor.js:171835)
    at w.require (vendor.js:171835)
    at Number.<anonymous> (todo-item.component.ts:4)
    at c (vendor.js:171835)
    at w.require (vendor.js:171835)
    at Number.<anonymous> (app.module.ts:13)
    at c (vendor.js:171835)
    at w.require (vendor.js:171835)
    at Number.<anonymous> (main.ts:9)
(anonymous) @ vendor.js:111229
c @ vendor.js:171835
w.require @ vendor.js:171835
(anonymous) @ todo-item.component.ts:4
c @ vendor.js:171835
w.require @ vendor.js:171835
(anonymous) @ app.module.ts:13
c @ vendor.js:171835
w.require @ vendor.js:171835
(anonymous) @ main.ts:9
c @ vendor.js:171835
r.import @ vendor.js:171835
(anonymous) @ todo.service.ts:5
(anonymous) @ todo.service.ts:5
vendor.js:171835 rectangular not found on request

but 'rectangular' is not included in result-js, but listet in bundle-log :/

@Tenvan
Copy link
Author

Tenvan commented May 23, 2017

test project is updated with a new branch feature/fin-hypergrid

@nchanged
Copy link
Contributor

@Tenvan i see the problem. Package rectangular is broken. Check out node_modules/rectangular/package.json

"main": "./src/js/rectangular.js",

But the folder node_modules/rectangular contains no sub-folders. That's why fusebox is confused. We could technically check for entry point existence and fall back to index.js

For now, a solution is to override node_modules using register directive:

fuse.register("rectangular", { homeDir: "node_modules/rectangular", main: "index.js", instructions: "**/**.js" })

I just tested and it works just fine

@Tenvan
Copy link
Author

Tenvan commented May 24, 2017

ok, migrating now complete and all is working... with a huge bundle of packages (angular, covalent, fin-hypergrid, redux, edge, moment, lodash and some more)
fuse-box is a very fine and greate tool :)

@nchanged
Copy link
Contributor

Nice! You will be able to make your bundles smaller :) very soon :)

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

2 participants