web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Environment Not Found ...
Power Apps
Answered

Environment Not Found Error While Creating a Code App Using the New npm CLI

(0) ShareShare
ReportReport
Posted on by 17

Hi Everyone,

I am trying to create a Code App from scratch using the new npm CLI by following the Microsoft documentation:

https://learn.microsoft.com/en-in/power-apps/developer/code-apps/how-to/npm-quickstart

However, I am consistently running into the following error for command " npx power-apps init":

Environment '4fa73ba7-b430-e7da-bc5e-1655f0146644' not found. Please verify the environment ID and ensure you have access to it.

Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src\win\async.c, line 94

To troubleshoot, I have:

  • Followed the documentation step-by-step.
  • Tested on two different machines.
  • Used different environments.
  • Used different user credentials.

Despite these attempts, I am seeing the exact same error.

My observation is that the issue may be related to authentication or the CLI failing to correctly associate the authenticated user with the selected environment, even though I have access to the environment in Power Platform.

Has anyone else encountered this issue while using the new npm CLI for Code Apps? If so, were you able to identify the root cause or find a workaround?

Any guidance would be greatly appreciated.

Thank you!

I have the same question (0)
  • Verified answer
    vipuljain03 Profile Picture
    694 Super User 2026 Season 1 on at
    Hello,
     
     
    This suggests to downgrading to PAC CLI v2.4.1 — uninstall your current version and reinstall v2.4.1.
     
    ===========================
    If this reply helped you, please mark this reply as suggested answer ✔️ and give it a like to help others in the community find the answer too! Thanks,
    Vipul

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 414

#2
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 315 Super User 2026 Season 1

Last 30 days Overall leaderboard