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

Not working in Windows #14

Closed
Digicrat opened this issue Jan 26, 2022 · 4 comments · Fixed by #18 or #23
Closed

Not working in Windows #14

Digicrat opened this issue Jan 26, 2022 · 4 comments · Fixed by #18 or #23

Comments

@Digicrat
Copy link

Digicrat commented Jan 26, 2022

Under WSL with Node.js v17, I get the following in both the browser and shell. The file in question exists (it's a copy of a jscad example from https://www.openjscad.xyz/ ?->"Building a Dodecahedron") and can even be accessed from the opened server page.

Can't walk dependency graph: Cannot find module 'test_jscad.js' from '/home/david/test/jscad-now.js'
    required by /home/david/test/jscad-now.js

Under Windows 10 directly via Powershell in Node v16 I get no errors in the shell, a blank page in the browser, and an exception in the browser javascript console

parameterControls.js:19 Uncaught TypeError: Cannot read properties of null (reading 'map')
    at createParamControls (jscad-now.js:39537:41)
    at designParameters (jscad-now.js:39488:24)
    at module.exports (jscad-now.js:39341:45)
    at module.exports (jscad-now.js:39325:3)
    at Object.606../test1.jscad (jscad-now.js:39934:1)
    at o (jscad-now.js:1:265)
    at r (jscad-now.js:1:431)
    at jscad-now.js:1:460

Also, fyi, npm is reporting 5 'high severity vulnerabilities'.

@danmarshall
Copy link
Owner

My first instinct is that this must be happening somewhere in the Budo library layer / or its dependencies.
Probably also related to the vulnerabilities, as it does not seem to be maintained.

@danmarshall
Copy link
Owner

We can probably switch to webpack. I only chose Budo since it was already part of the regl-renderer 's dev script.
THis project is just a quick takeoff from that.
https://github.com/jscad/OpenJSCAD.org/blob/b4d808a34fccd3fc72a327921dfd9fa997de9d99/packages/utils/regl-renderer/package.json#L11

@hjfreyer
Copy link

hjfreyer commented Aug 7, 2022

Is there any workaround for this, or is it just busted? I'm having the same problem on Debian.

@danmarshall
Copy link
Owner

Do your models provide parameter definitions? The previous code was expecting it:

const main = ()=> cube();

function getParameterDefinitions() {
    return [];
}
module.exports = { main, getParameterDefinitions }

I've just fixed this in 1.2.2, getParameterDefinitions is no longer required. Hopefully this fixes the issue.

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