pitch-io / uix-starter

Template project to start building a web app with UIx2
Eclipse Public License 2.0
26 stars 4 forks source link

Creating with `--react-native` fails #7

Closed stigi closed 1 year ago

stigi commented 1 year ago

It seems like the script is looking for package.json in the parent folder (in which I ran npx create-uix-app@latest appapp --react-native) instead of inside the newly created project dir.

~/tmp/empty ❯ npx create-uix-app@latest appapp --react-native
Downloading project template from https://github.com/pitch-io/uix-starter...
node:fs:600
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, open '/Users/ullrich/tmp/empty/package.json'
    at Object.openSync (node:fs:600:3)
    at Object.readFileSync (node:fs:468:35)
    at /Users/ullrich/.npm/_npx/b060ad3aea9e9b3b/node_modules/create-uix-app/src/index.js:81:14
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/Users/ullrich/tmp/empty/package.json'
}

Node.js v18.12.1
stigi commented 1 year ago

Oh... I am just unable to read the docs :D

I'm supposed to run npx create-uix-app@latest appapp --react-native inside an existing react-native project.

My bad. I was under the impression create-uix-app would always create a full app from scratch.

For completeness sake, if I run things like this, it works 👍