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

[Bug] Having error with latest create-leo-app #941

Closed
zklimaleo opened this issue Oct 21, 2024 · 8 comments · Fixed by #945
Closed

[Bug] Having error with latest create-leo-app #941

zklimaleo opened this issue Oct 21, 2024 · 8 comments · Fixed by #945
Labels
bug Something isn't working

Comments

@zklimaleo
Copy link

🐛 Bug Report

Follow guide to run create-leo-app but encounter error during run dev. Noticed the update of @provablehq/sdk to 0.7.0. Fallback to 0.6.13 works.

Steps to Reproduce

Code snippet to reproduce

npm create leo-app@latest
cd aleo-project
npm install
npm run dev

Stack trace & error message

Failed to resolve import "core-js/proposals/json-parse-with-source.js" from "node_modules/@provablehq/sdk/dist/testnet/browser.js?v=cc7fe778". Does the file exist?
6:05:15 PM [vite] Internal server error: Failed to resolve import "core-js/proposals/json-parse-with-source.js" from "node_modules/@provablehq/sdk/dist/testnet/browser.js?v=cc7fe778". Does the file exist?
  Plugin: vite:import-analysis
  File: /aleo-project/node_modules/@provablehq/sdk/dist/testnet/browser.js?v=cc7fe778:1:9
  1  |  import 'core-js/proposals/json-parse-with-source.js';
     |          ^
  2  |  import { ViewKey, Address, PrivateKeyCiphertext, PrivateKey, RecordCiphertext, Program, Transaction, ProvingKey, VerifyingKey, ProgramManager as ProgramManager$1, RecordPlaintext, verifyFunctionExecution, Metadata } from '@provablehq/wasm/testnet.js';
  3  |  export { Address, ExecutionResponse, Field, Execution as FunctionExecution, OfflineQuery, PrivateKey, PrivateKeyCiphertext, Program, ProgramManager as ProgramManagerBase, ProvingKey, RecordCiphertext, RecordPlaintext, Signature, Transaction, VerifyingKey, ViewKey, initThreadPool, verifyFunctionExecution } from '@provablehq/wasm/testnet.js';

Expected Behavior

Able to run dev without errors

Your Environment

  • create-leo-app Version - 0.7.3
  • Provable SDK Version - 0.7.0
  • Computer OS - MacOS Sequoia 15.0.1
@zklimaleo zklimaleo added the bug Something isn't working label Oct 21, 2024
@Neo-Gar
Copy link

Neo-Gar commented Oct 29, 2024

Same issue

1 similar comment
@RevelationOfTuring
Copy link

Same issue

@d0cd
Copy link
Collaborator

d0cd commented Nov 22, 2024

For context, this error only occurs when I run npm create leo-app@latest and select Node.js as the framework

@iamalwaysuncomfortable
Copy link
Collaborator

@Pauan any idea why this might be?

@zkxuerb
Copy link

zkxuerb commented Nov 27, 2024

This issue also occurs when running npm create leo-app@latest with React, and then building the project using npm run build.

@d0cd
Copy link
Collaborator

d0cd commented Nov 27, 2024

For the React option, I was able to get npm run build working after installing core-js.
For the Typescript option, I get this error when I get this error

> npm run dev
npm error Missing script: "dev"
npm error
npm error To see a list of scripts, run:
npm error   npm run
npm error A complete log of this run can be found in: /Users/pranav/.npm/_logs/2024-11-27T16_16_51_580Z-debug-0.log

@zklimaleo
Copy link
Author

For the React option, I was able to get npm run build working after installing core-js. For the Typescript option, I get this error when I get this error

> npm run dev
npm error Missing script: "dev"
npm error
npm error To see a list of scripts, run:
npm error   npm run
npm error A complete log of this run can be found in: /Users/pranav/.npm/_logs/2024-11-27T16_16_51_580Z-debug-0.log

There's some errors printed in console and all functions from worker.js doesn't work even after installed core-js package for React option
Screenshot 2024-11-28 at 12 54 19 AM

@Pauan
Copy link
Collaborator

Pauan commented Nov 27, 2024

Thanks for the report, this seems to be caused by #925, I think we just need to update the examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants