You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, huy,
I come up with an issue while using the library.
I installed it with npm npm i squarify,
I make an index.js file where i import the module import squarify from 'squarify';
(if I import the module not as a default, ie. import { squarify } from 'squarify' the error is:
const x0 = rect.x0;
^
TypeError: Cannot read property 'x0' of undefined
at rectToContainer (C:\Users\Asus\Desktop\test-square\node_modules\squarify\lib\index.js:98:19)
at getShortestEdge (C:\Users\Asus\Desktop\test-square\node_modules\squarify\lib\index.js:111:21)
at squarify (C:\Users\Asus\Desktop\test-square\node_modules\squarify\lib\index.js:218:19)
at file:///C:/Users/Asus/Desktop/test-square/index.js:53:13
at ModuleJob.run (internal/modules/esm/module_job.js:152:23)
at async Loader.import (internal/modules/esm/loader.js:166:24)
at async Object.loadESM (internal/process/esm_loader.js:68:5)
and then I copy/paste the container, the array and the function invocation
and what i get is this:
C:\Users\Asus\Desktop\test-square>node index.js
file:///C:/Users/Asus/Desktop/test-square/index.js:26
const output = squarify(data, container);
^
ReferenceError: squarify is not defined
at file:///C:/Users/Asus/Desktop/test-square/index.js:26:16
←[90m at ModuleJob.run (internal/modules/esm/module_job.js:152:23)←[39m
←[90m at async Loader.import (internal/modules/esm/loader.js:166:24)←[39m
←[90m at async Object.loadESM (internal/process/esm_loader.js:68:5)←[39m
Am i doing something wrong?
Thank you!
The text was updated successfully, but these errors were encountered:
Hi, huy,
I come up with an issue while using the library.
(if I import the module not as a default, ie. import { squarify } from 'squarify' the error is:
const x0 = rect.x0;
^
TypeError: Cannot read property 'x0' of undefined
at rectToContainer (C:\Users\Asus\Desktop\test-square\node_modules\squarify\lib\index.js:98:19)
at getShortestEdge (C:\Users\Asus\Desktop\test-square\node_modules\squarify\lib\index.js:111:21)
at squarify (C:\Users\Asus\Desktop\test-square\node_modules\squarify\lib\index.js:218:19)
at file:///C:/Users/Asus/Desktop/test-square/index.js:53:13
at ModuleJob.run (internal/modules/esm/module_job.js:152:23)
at async Loader.import (internal/modules/esm/loader.js:166:24)
at async Object.loadESM (internal/process/esm_loader.js:68:5)
and what i get is this:
C:\Users\Asus\Desktop\test-square>node index.js
file:///C:/Users/Asus/Desktop/test-square/index.js:26
const output = squarify(data, container);
^
ReferenceError: squarify is not defined
at file:///C:/Users/Asus/Desktop/test-square/index.js:26:16
←[90m at ModuleJob.run (internal/modules/esm/module_job.js:152:23)←[39m
←[90m at async Loader.import (internal/modules/esm/loader.js:166:24)←[39m
←[90m at async Object.loadESM (internal/process/esm_loader.js:68:5)←[39m
Am i doing something wrong?
Thank you!
The text was updated successfully, but these errors were encountered: