Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

with-electron-typescript #18934

Closed
lewisHeart opened this issue Nov 8, 2020 · 2 comments · Fixed by #18976
Closed

with-electron-typescript #18934

lewisHeart opened this issue Nov 8, 2020 · 2 comments · Fixed by #18976
Labels
examples Issue/PR related to examples good first issue Easy to fix issues, good for newcomers
Milestone

Comments

@lewisHeart
Copy link

Bug report

Describe the bug

The electron example
https://github.com/vercel/next.js/tree/canary/examples/with-electron-typescript

First when I use yarn dev, he returns:
yarn run v1.22.5 error Couldn't find a package.json file in "/home/huge/Projetos" info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

When I use yarn start, he returns:
yarn run v1.22.5 error Couldn't find a package.json file in "/home/huge/Projetos" info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

To Reproduce

  1. Execute create-next-app with npm or Yarn to bootstrap the example:
    npx create-next-app --example with-electron-typescript with-electron-typescript-app

or

yarn create next-app --example with-electron-typescript with-electron-typescript-app
2.Execute yarn dev or yarn start

Expected behavior

The program should run normally.

Screenshots

Captura de tela de 2020-11-08 01-19-24

Captura de tela de 2020-11-08 01-18-56

System information

  • OS: Pop!_OS 20.10 x86_64
  • Version of Next.js: v10.0
  • Version of Node.js: v14.15.0

Additional context

I tried on elementary OS also the error happened the same way, and as much as npm or yarn gave the same result.

@lewisHeart lewisHeart added the bug Issue was opened via the bug report template. label Nov 8, 2020
@Timer Timer added good first issue Easy to fix issues, good for newcomers examples Issue/PR related to examples and removed bug Issue was opened via the bug report template. labels Nov 9, 2020
@davidsonsns
Copy link
Contributor

You were getting these messages why:

  • The previous version of this example didn't have a dev script;
  • All the code into the electron-src folder are typescript. So, to be able to get the file main/index.js you need first to transpile it to js running build-electron.

I send a PR adding it in a single command (dev) and fixing another issue that you probably would get with react v16.

@kodiakhq kodiakhq bot closed this as completed in #18976 Nov 9, 2020
kodiakhq bot pushed a commit that referenced this issue Nov 9, 2020
- Changed script `start` to `dev` and improved it #18934 adding commando to transpile electron code;
- Added some folders into `.gitignore`;
- Updated react to avoid issues as #18916

Fixes #18934
@Timer Timer added this to the iteration 12 milestone Nov 9, 2020
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue/PR related to examples good first issue Easy to fix issues, good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants