Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Gibberish main window #70

Closed
garyrob opened this issue Nov 2, 2021 · 7 comments
Closed

Gibberish main window #70

garyrob opened this issue Nov 2, 2021 · 7 comments

Comments

@garyrob
Copy link

garyrob commented Nov 2, 2021

The first time I do npm start, the attached screenshot is the window I see. This is on MacOS 11.6.

I did have some other problems getting it running at all for the first time. I was able to get past them, but I am mentioning them here in case they're related. The first is described at this link, which was resolved by following the "Try the following" comment at the bottom of the linked page. The other was resolved by doing export NODE_OPTIONS=--openssl-legacy-provider.

I'm no longer concerned about those earlier problems, but obviously, the screenshot shows a serious current problem.

svelte-nodegui main window

@shirakaba
Copy link
Collaborator

Could you try deleting the package-lock.json and reinstalling the dependencies and seeing whether it improves things?

Basically I can’t explain the issue so I can only conclude that NodeGUI itself (which Svelte NodeGUI depends upon) has changed since I was last working on this.

@jsprog
Copy link

jsprog commented Nov 4, 2021

@shirakaba , with all respects to your efforts with this project, I already explained the same problem about rendering in #68 and said that it started with @nodegui/[email protected].

@shirakaba
Copy link
Collaborator

shirakaba commented Nov 5, 2021

On my end, I never saw such problems in versions following 0.0.4, so I don’t have much to go on.

Can you try pinning your @nodegui/nodegui dependency to be exactly this version and tell me whether it helps?

npm install --save --save-exact @nodegui/[email protected]

@garyrob
Copy link
Author

garyrob commented Nov 7, 2021

[Sorry for the slow response; I fell quite ill and basically dropped out of normal life for a couple days.]

Hmm. If I use that version of nodegui (0.30.2) I get the error I'll paste below when I do npm run dev. It's because of that that I found this page and used version 0.1.2 instead, which did eliminate the error... at the cost, I now assume, of causing the gibberish output. Obvious, 0.1.2 is MUCH earlier, so using it isn't really a viable fix. But why do current versions cause this error on my machine? I'm running node 17.0.1.

ERROR in ./src/app.ts 1:0-56
Module not found: Error: Can't resolve '@nodegui/svelte-nodegui' in '/Users/garyrob/Source/test/svelte/svelte-nodegui-starter/src'
resolve '@nodegui/svelte-nodegui' in '/Users/garyrob/Source/test/svelte/svelte-nodegui-starter/src'
  Parsed request is a module
  using description file: /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/package.json (relative path: ./src)
    resolve as module
      /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/src/node_modules doesn't exist or is not a directory
      looking for modules in /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules
        single file module
          using description file: /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/package.json (relative path: ./node_modules/@nodegui/svelte-nodegui)
            no extension
              /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui is not a file
            .ts
              /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui.ts doesn't exist
            .mjs
              /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui.mjs doesn't exist
            .js
              /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui.js doesn't exist
            .svelte
              /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui.svelte doesn't exist
            .scss
              /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui.scss doesn't exist
            .css
              /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui.css doesn't exist
            .json
              /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui.json doesn't exist
        existing directory /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui
          using description file: /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui/package.json (relative path: .)
            using description file: /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/package.json (relative path: ./node_modules/@nodegui/svelte-nodegui)
              no extension
                /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui is not a file
              .ts
                /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui.ts doesn't exist
              .mjs
                /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui.mjs doesn't exist
              .js
                /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui.js doesn't exist
              .svelte
                /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui.svelte doesn't exist
              .scss
                /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui.scss doesn't exist
              .css
                /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui.css doesn't exist
              .json
                /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui.json doesn't exist
              as directory
                existing directory /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui
                  using description file: /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui/package.json (relative path: .)
                    using path: /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui/index
                      using description file: /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui/package.json (relative path: ./index)
                        no extension
                          /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui/index doesn't exist
                        .ts
                          /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui/index.ts doesn't exist
                        .mjs
                          /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui/index.mjs doesn't exist
                        .js
                          /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui/index.js doesn't exist
                        .svelte
                          /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui/index.svelte doesn't exist
                        .scss
                          /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui/index.scss doesn't exist
                        .css
                          /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui/index.css doesn't exist
                        .json
                          /Users/garyrob/Source/test/svelte/svelte-nodegui-starter/node_modules/@nodegui/svelte-nodegui/index.json doesn't exist
      /Users/garyrob/Source/test/svelte/node_modules doesn't exist or is not a directory
      /Users/garyrob/Source/test/node_modules doesn't exist or is not a directory
      /Users/garyrob/Source/node_modules doesn't exist or is not a directory
      looking for modules in /Users/garyrob/node_modules
        single file module
          using description file: /Users/garyrob/package.json (relative path: ./node_modules/@nodegui/svelte-nodegui)
            no extension
              /Users/garyrob/node_modules/@nodegui/svelte-nodegui doesn't exist
            .ts
              /Users/garyrob/node_modules/@nodegui/svelte-nodegui.ts doesn't exist
            .mjs
              /Users/garyrob/node_modules/@nodegui/svelte-nodegui.mjs doesn't exist
            .js
              /Users/garyrob/node_modules/@nodegui/svelte-nodegui.js doesn't exist
            .svelte
              /Users/garyrob/node_modules/@nodegui/svelte-nodegui.svelte doesn't exist
            .scss
              /Users/garyrob/node_modules/@nodegui/svelte-nodegui.scss doesn't exist
            .css
              /Users/garyrob/node_modules/@nodegui/svelte-nodegui.css doesn't exist
            .json
              /Users/garyrob/node_modules/@nodegui/svelte-nodegui.json doesn't exist
        /Users/garyrob/node_modules/@nodegui/svelte-nodegui doesn't exist
      /Users/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory

webpack 5.24.2 compiled with 1 error in 2755 ms
ERROR in src/app.ts:1:31
TS2307: Cannot find module '@nodegui/svelte-nodegui' or its corresponding type declarations.
  > 1 | import { svelteNodeGUI } from "@nodegui/svelte-nodegui";
      |                               ^^^^^^^^^^^^^^^^^^^^^^^^^
    2 |
    3 | import App from "./App.svelte";
    4 | svelteNodeGUI(App, {});

@shirakaba
Copy link
Collaborator

shirakaba commented Nov 8, 2021

Obvious, 0.1.2 is MUCH earlier, so using it isn't really a viable fix.

0.1.2 is the latest version of @nodegui/svelte-nodegui. Unless you're talking about @nodegui/nodegui – but I've never developed against version 0.1.2 of that, so let's not go down that rabbit hole.

Obvious, 0.1.2 is MUCH earlier, so using it isn't really a viable fix.

No idea. Doesn't happen on my side, and I've looked into it in other issue threads without any luck. My working setup:

  • Node.js v14.6.0 (this is probably the main factor)
  • macOS Big Sur

As the issue doesn't reproduce on my setup, I'm afraid I must rely on other users to get to the bottom of it!

But why do current versions cause this error on my machine?

Current versions of @nodegui/nodegui? I don't know. I only developed against version 0.30.2, so if there have been any breaking changes since, it's unexpected, and I simply suggest continuing to use only v0.30.2 of @nodegui/nodegui.

It could also be that the starter template is not quite right. You could try cloning the main @nodegui/svelte-nodegui repository and seeing whether the included example app runs any better than the starter template does. If so, you can then try determining what's different between the two.

@garyrob
Copy link
Author

garyrob commented Nov 8, 2021

Sorry about the version number confusion... as I mentioned above I was quite ill for a couple days and am still not fully recovered or up to my normal level of thinking!

I just wanted to try svelte-nodegui out, but couldn't because of the errors mentioned above. I'm not sure I'll be able to spend more time investigating it, although I'd like to. I'll post here if I do.

@shirakaba
Copy link
Collaborator

Closed in favour of #72.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants