BuilderIO/mitosis

Installation not working on windows

Opened this issue · 0 comments

I am interested in helping provide a fix!

Yes

Which generators are impacted?

  • All
  • Angular
  • HTML
  • Preact
  • Qwik
  • React
  • React-Native
  • Solid
  • Stencil
  • Svelte
  • Vue
  • Web components

Reproduction case

.

Expected Behaviour

When running the command npm run start inside the library folder it should start watching files and generating components for the single frameworks

Actual Behaviour

This does not happens on windows since it results in the following error:

PS C:\Users\giuli\Desktop\projects\ccc\library> npm run start

> start
> watch 'npm run build' ./src

> Watching run
> Watching build'
> Watching ./src
C:\Users\giuli\Desktop\projects\ccc\node_modules\watch\main.js:73
    if (err) throw err;
             ^

[Error: ENOENT: no such file or directory, stat 'C:\Users\giuli\Desktop\projects\ccc\library\run'] {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'stat',
  path: 'C:\\Users\\giuli\\Desktop\\projects\\ccc\\library\\run'
}

Node.js v20.13.1
npm ERR! Lifecycle script `start` failed with error:
npm ERR! Error: command failed
npm ERR!   in workspace: @ccc/library
npm ERR!   at location: C:\Users\giuli\Desktop\projects\ccc\library

Additional Information

Turns out that the problem is in the packaje.json start script that uses single quotes for the command npm run build.
In windows terminal that does not work. The problem can be fixed by replacing the single quotes with escaped double quotes.
I'm wishing to open a PR to fix this.