as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
感谢您的访问。此页面目前仅提供英语版本。我们正在开发中文版本。谢谢您的理解。

Configure Node Package Managers to Work with Vega SDK

The Vega command-line interface (CLI) builds the native portion and generates app packages (.vpkg files), leaving JavaScript build processes to your preferred node package managers and orchestrators, such as npm, Yarn, and pnpm.

By default, the Vega Software Development Kit (SDK) works with npm. Therefore, this page only provides configuration instructions for Yarn and pnpm package managers.

Yarn

Step 1. Install Yarn, version 3.8.1 or later. For installation instructions, see Yarn installation documentation.

Step 2. To use npm-run-all with Yarn, use the NPM_EXECPATH to set the path to Yarn.

Step 3. Set this environment variable in your .bashrc or .zshrc file:

export NPM_EXECPATH=$(which yarn)

Or, use it directly in your terminal when running with Yarn.

NPM_EXECPATH=$(which yarn) yarn

Step 4. Use Yarn to install dependencies and build.

// for application projects
yarn install
yarn build:app

// for turbomodule projects
yarn install 
yarn pack

pnpm

Step 1. Install pnpm, version 9.x or later. For installation instructions, see pnpm installation documentation.

Step 2. Remove any existing pnpm-lock.yaml file.

Copied to clipboard.

rm yarn.lock package-lock.json

Step 3. To use npm-run-all with pnpm, use the NPM_EXECPATH to set the path to pnpm.

Step 4. Set this environment variable in your .bashrc or .zshrc file:

export NPM_EXECPATH=$(which pnpm)

Or, use it directly in your terminal when running with pnpm.

NPM_EXECPATH=$(which pnpm) pnpm

Step 5. Use pnpm to install dependencies and build.

// for application projects
pnpm install
pnpm build:app

// for turbomodule projects
pnpm install 
pnpm pack

Enable React Native bundling with pnpm

To enable React Native bundling with PNPM, update your app's metro.config.js file and set the unstable_enableSymlinks property like this:

Copied to clipboard.

const config = {
  // ...
  resolver: {
    unstable_enableSymlinks: true,
  },
};

Last updated: Sep 30, 2025