svelte-nodegui icon indicating copy to clipboard operation
svelte-nodegui copied to clipboard

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

Open ohbob opened this issue 2 years ago • 4 comments

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

> [email protected] 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```

ohbob avatar Aug 04 '21 06:08 ohbob

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

taw avatar Oct 06 '21 18:10 taw

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.

shirakaba avatar Oct 06 '21 18:10 shirakaba

See this duplicate issue: https://github.com/nodegui/svelte-nodegui-starter/issues/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.

shirakaba avatar Dec 27 '21 22:12 shirakaba

Same happened to me. Manually installed it and it ran

M-Gonzalo avatar Sep 16 '22 16:09 M-Gonzalo