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

Bounty: Issue: Error Build when running npm run dev after npx create-near-app #2161

Open
1 task done
Amira1502 opened this issue Oct 24, 2024 · 3 comments
Open
1 task done
Assignees

Comments

@Amira1502
Copy link

Amira1502 commented Oct 24, 2024

What talent are you looking for?

Development

What you need to be done?

Description:
I encountered an error while running the command npm run dev after creating a project using npx create-near-app. The build failed with the following error message:

image

Steps to Reproduce:

  1. Run npx create-near-app to create web app
  2. After the project is generated, run npm install.
  3. Execute npm run dev.

Expected Behavior:
The development server should start without any issues

Actual Behavior:
The build fails with a compilation error related to the @wagmi/core package.

Possible Cause:
It seems that the version of @wagmi/core being used in the project has changed its exports, and extractRpcUrls is no longer available, or the package has not been updated to reflect the change.

Environment:
Node.js version: 20
Next.js version: 14.2.13
OS: Windows

Possible Fixes:
Updating to a compatible version of @wagmi/core or ensuring that the package correctly exports extractRpcUrls.
Modifying the code in metaMask.js to handle the change in the exports.

Tags

dApp, Quality Assurance

Deadline

19.05.2025

Currency

USDt

Amount

100

KYC

  • Use KYC Verification
@aybanda
Copy link

aybanda commented Oct 25, 2024

Hello @Amira1502 and @near team,

I'm happy to report that I've successfully recreated the project using create-near-app, and it's working well without encountering the reported error. Here are the details of my environment and process:

Environment:

  • Node.js version: [v18.20.4]
  • npm version: [10.7.0]
  • Operating System: [macOS ProductVersion: 14.6.1 BuildVersion: 23G93]

Steps I followed:

  1. Ran npx create-near-app@latest [ Initially tried it with 'npx create-near-app' encountered problems.]
  2. Followed the prompts to create a new project
  3. Navigated to the project directory
  4. Ran npm install
  5. Executed npm run dev

The project started successfully without any errors related to @wagmi/core or extractRpcUrls.

I want to note that I couldn't replicate the exact scenario from the original report using npx create-near-app without the @latest tag.

It seems that the issue might have been resolved in a recent update or may be environment-specific. I hope this information is helpful for closing this issue.

Thank you for your attention to this matter and for fostering community involvement through bounties.

Regarding the bounty, I believe I've successfully resolved the reported problem by verifying that the current version of create-near-app works correctly. Please let me know if you need any additional information or if there are any other steps I should take to claim the bounty.

'hello-near' running successfully without errors:

Screenshot 2024-10-25 at 1 17 52 PM Screenshot 2024-10-25 at 1 08 34 PM

@Amira1502
Copy link
Author

Hello @aybanda,

Thank you for the detailed feedback and for verifying the issue in your environment. It’s great to know that create-near-app@latest worked as expected for you, with no errors related to @wagmi/core or extractRpcUrls. Your insights on environment-specific differences are particularly valuable.
Unfortunately, I'm still experiencing the issue in my setup, which runs in a WSL environment on Windows 11. Here are my environment details:

  • Node.js version: 18.18.0
  • Operating System: WSL (Ubuntu) on Windows 11

I encountered the same error when using npx create-near-app@latest.

image

image

This issue seems to be specific to certain environments, as it appears under WSL but not on macOS.

Update: I found a temporary workaround that resolved the issue in my environment:

  1. Removed node_modules with rm -rf node_modules
  2. Copy code : npm install @wagmi/connectors@latest @wagmi/core@latest

image

While I was able to get the project running with these adjustments, I’m still experiencing intermittent issues in my WSL environment.
Please let me know if you need any additional information or if there are any further steps I should take to proceed with the bounty claim.

Thank you for your support!
Best,
Amira

@aybanda
Copy link

aybanda commented Oct 25, 2024

Hey @Amira1502 It's great that you found a temporary fix. For a more permanent solution to those intermittent WSL issues, here are a few key things to try:

  1. Update WSL and Ubuntu: Run wsl --update and sudo apt update && sudo apt upgrade.

  2. Ensure Node.js consistency: Use nvm to manage Node versions. Install it with:
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
    Then use nvm install --lts and nvm use --lts.

  3. Try npm ci instead of npm install to ensure exact dependency versions.

  4. Create a .npmrc file in your project root with:

    save-exact=true
    package-lock=true
    

These steps should help stabilize your environment. If you're still having trouble, let us know the specific errors you're seeing. The NEAR team might also have some WSL-specific insights to share.

Regarding the 100 USDT bounty mentioned in the issue description, I'm not entirely sure about the process for claiming it or if my contribution qualifies. Could someone from the @near team provide some guidance on this? I'm happy to have helped troubleshoot the issue, but I want to make sure I understand the next steps, if any, for the bounty consideration.

In the meantime, I'm glad we've made some headway on this problem. If there's anything else I can do to help further, please let me know!

@thisisjoshford thisisjoshford moved this from NEW❗ to Ready for development ✅ in DevRel Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for development ✅
Development

No branches or pull requests

3 participants