nanoapi-io / napi

Transpile your monolithic codebases to microservices in seconds
https://nanoapi.io
Other
171 stars 3 forks source link

Fix ENOENT Error on Windows by Creating Missing C:\tmp\napi_session_id Directory and Add Cross-Platform Support for NODE_ENV with Cross-Env #40

Closed emmanuel39hanks closed 1 day ago

emmanuel39hanks commented 1 day ago

Type of change

Description

This PR addresses cross-platform compatibility issues in the development environment, specifically enhancing support for Windows users.

Fixes and Improvements

Windows Compatibility: Resolved NODE_ENV setting issue by integrating cross-env, ensuring environment variables are correctly set across all platforms. Cross-Platform CLI Compatibility: The CLI development environment's overall compatibility has been improved, making it more accessible and reliable for developers on Windows and UNIX-based systems.

Related Issue

Issue Link (https://github.com/nanoapi-io/napi/issues/38) Issue Number: #38

Motivation and Context

This change improves cross-platform compatibility by resolving issues with setting temp directory and NODE_ENV on Windows.

How Has This Been Tested?

Tested two main changes: Cross-env Addition: Tested on Windows 11 Verified cross-env NODE_ENV=development works Temporary Directory Fix: Tested on Windows that we are able to initialize a project with no issues

Checklist