saltyshiomix/create-nextron-app

Failed when I run yarn create-nextron-app my-app

lolieatapple opened this issue · 7 comments

Failed when I run yarn create-nextron-app my-app

Version:
OS: macOS 13.0
node.js: v16.17.0
create-nextron-app@3.11.0

when I run: yarn create nextron-app my-app or npx create-nextron-app my-app

it shows:

✖ Validating existence...
Error! Not found: with-javascript

@lolieatapple

Sorry for late reply and thank you for your issue.

I can't reproduce this error. Could you retry run command?

Same problem @saltyshiomix

Windows: 11
node: 16.15.1

yarn create nextron-app my-app

success Installed "create-nextron-app@4.3.0" with binaries:
      - create-nextron-app
⠴ Validating existence...RequestError [HttpError]: Not Found
    at C:\Users\Usuario\AppData\Local\Yarn\Data\global\node_modules\@octokit\request\dist-node\index.js:88:21
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async validateExistence (C:\Users\Usuario\AppData\Local\Yarn\Data\global\node_modules\create-nextron-app\index.js:75:3)
    at async createNextronApp (C:\Users\Usuario\AppData\Local\Yarn\Data\global\node_modules\create-nextron-app\index.js:56:5) {
  status: 404,
  response: {
    url: 'https://api.github.com/repos/saltyshiomix/nextron/contents/examples%2Fwith-javascript%2Fpackage.json?ref=main',
    status: 404,
    headers: {
      'access-control-allow-origin': '*',
      'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
      connection: 'close',
      'content-encoding': 'gzip',
      'content-length': '118',
      'content-security-policy': "default-src 'none'",
      'content-type': 'application/json; charset=utf-8',
      date: 'Tue, 10 Jan 2023 02:02:41 GMT',
      'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
      server: 'GitHub.com',
      'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
      vary: 'Accept-Encoding, Accept, X-Requested-With',
      'x-content-type-options': 'nosniff',
      'x-frame-options': 'deny',
      'x-github-api-version-selected': '2022-11-28',
      'x-github-media-type': 'github.v3; format=json',
      'x-github-request-id': '589A:606A:224A78:25C749:63BCC741',
      'x-ratelimit-limit': '60',
      'x-ratelimit-remaining': '55',
      'x-ratelimit-reset': '1673319259',
      'x-ratelimit-resource': 'core',
      'x-ratelimit-used': '5',
      'x-xss-protection': '0'
    },
    data: {
      message: 'Not Found',
      documentation_url: 'https://docs.github.com/rest/reference/repos#get-repository-content'
    }
  },
  request: {
    method: 'GET',
    url: 'https://api.github.com/repos/saltyshiomix/nextron/contents/examples%2Fwith-javascript%2Fpackage.json?ref=main',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'octokit-rest.js/19.0.5 octokit-core.js/4.1.0 Node.js/16.15.1 (win32; x64)'
    },
    request: { hook: [Function: bound bound register] }
  }
}
✖ Validating existence...

Error! Not found: with-javascript
error Command failed.

you can read the script and manully run it.

Looking more closely at the script, I noticed that the problem is in two places. One here:

const example = args['--example'] || 'with-javascript';

and here:

https://github.com/saltyshiomix/nextron/tree/main/examples

it looks like it is not "with-javascript" it is "basic-javascript"

worked for me with: yarn create nextron-app my-app --example basic-javascript

Big thanks @Neyunse !

@lolieatapple Could you retry the command?

# `basic-javascript` example
npx create-nextron-app@latest my-app

I have tried. it is ok now.

@lolieatapple Thank you for trying 🥇