nodegui / svelte-nodegui

Build performant, native and cross-platform desktop applications with native Svelte + powerful CSS-like styling.🚀

Home Page:https://svelte.nodegui.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Module not found: Error: Can't resolve '@nodegui/svelte-nodegui'

ohbob opened this issue · comments

commented

The example starter won't work.
OSX. v11.5.1, m1.
Node v.16.3.0

git clone https://github.com/nodegui/svelte-nodegui-starter
cd svelte-nodegui-starter && npm install && npm run dev

Run `npm audit` for details.
❯ npm run dev

> svelte-nodegui-starter@1.0.2 dev
> webpack --mode=development

asset nodegui_core-03615e63696900d1383da152cd3c5c85.node 7.28 MiB [emitted] (auxiliary name: main)
asset index.js 1.39 MiB [emitted] (name: main) 1 related asset
asset 08ef36629f2fe40bdcbe135ae303d949.jpg 58.1 KiB [emitted] [immutable] [from: assets/nodegui.jpg] (auxiliary name: main)
runtime modules 21.9 KiB 10 modules
modules by path ./node_modules/@nodegui/nodegui/ 510 KiB 212 modules
modules by path ./node_modules/postcss/lib/*.js 479 KiB 25 modules
modules by path ./node_modules/source-map/ 99.4 KiB 11 modules
modules by path ./src/ 10.8 KiB
  modules by path ./src/components/ 6.85 KiB 3 modules
  2 modules
modules by path ./node_modules/cuid/ 2.88 KiB 4 modules
modules by path ./node_modules/webpack/hot/*.js 3.75 KiB 3 modules
modules by path ./node_modules/chalk/ 12.1 KiB 3 modules
modules by path ./node_modules/color-convert/*.js 20.3 KiB 3 modules
modules by path ./node_modules/svelte/ 54.1 KiB
  ./node_modules/svelte/internal/index.mjs 53.9 KiB [built] [code generated]
  ./node_modules/svelte/index.mjs 212 bytes [built] [code generated]
18 modules

ERROR in ./src/app.ts 1:0-56
Module not found: Error: Can't resolve '@nodegui/svelte-nodegui' in '/Users/def/Documents/Projects/sveltekit-todo-nodegui/nodetest1/svelte-nodegui-starter/src'
resolve '@nodegui/svelte-nodegui' in '/Users/def/Documents/Projects/sveltekit-todo-nodegui/nodetest1/svelte-nodegui-starter/src'
  Parsed request is a module
  using description file: /Users/def/Documents/Projects/sveltekit-todo-nodegui/nodetest1/svelte-nodegui-starter/package.json (relative path: ./src)
    resolve as module
      /Users/def/Documents/Projects/sveltekit-todo-nodegui/nodetest1/svelte-nodegui-starter/src/node_modules doesn't exist or is not a directory
      looking for modules in /Users/def/Documents/Projects/sveltekit-todo-nodegui/nodetest1/svelte-nodegui-starter/node_modules
        single file module
          using description file: /Users/def/Documents/Projects/sveltekit-todo-nodegui/nodetest1/svelte-nodegui-starter/package.json (relative path: ./node_modules/@nodegui/svelte-nodegui)
            no extension```

Yeah, same, still doesn't work, and really unclear why.

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

If not, no idea still 🤷‍♂️ never happened on my setup.

See this duplicate issue: nodegui/svelte-nodegui-starter#6

May or may not be due to package lock or version ranges stated. Best to fix it at the same time as fixing #72.

Same happened to me. Manually installed it and it ran