as

Settings
Sign out
Notifications
Alexa
Amazonアプリストア
AWS
ドキュメント
Support
Contact Us
My Cases
開発
設計と開発
公開
リファレンス
サポート
アクセスいただきありがとうございます。こちらのページは現在英語のみのご用意となっております。順次日本語化を進めてまいりますので、ご理解のほどよろしくお願いいたします。

Resolve Monorepo Issues

This page covers common issues and solutions when working with monorepo in Vega Studio. If you don't find a solution to your specific problem here, post an issue in Developer Forum for additional support.

Unsupported package manager

Cause: Vega Studio displays an error or fails to build when trying to use package managers other than npm or yarn v2. Vega Studio only supports npm and yarn v2 CLI. Other package managers won't work correctly with the build system.

Solution: Switch to a supported package manager:

  • Use npm for standard package management
  • Use yarn v2+ for advanced workspace features

Package manager not detected

Cause: Vega Studio can't detect the package manager in your monorepo and defaults to npm incorrectly. For empty or clean monorepos, detection can be challenging. Vega Studio defaults to npm, which might not apply to your setup.

Solution: Help Vega Studio identify your package manager:

  1. Install dependencies manually (npm install for npm and yarn install for yarn).
  2. Place an appropriate (even empty) lock file (package-lock.json or yarn.lock) in the monorepo root directory.

Build fails with "Turbo module tgz dependency not found or malformed" error

Cause: The build system can't locate or process the .tgz file referenced in your package.json dependencies.

Solution: Replace the file pointer to tgz with the latest package version:

Copied to clipboard.

// REPLACE
"@prefix/module-name": "file:...../prefix-module-name-0.0.1.tgz"
// WITH
"@prefix/module-name": "*"

npm installation fails during monorepo setup

Cause: Missing npm installation, incorrect .npmrc configuration, or conflicting files in parent directories.

Solution:

  1. Verify that npm is installed:

    Copied to clipboard.

    npm -v
    
  2. Verify .npmrc is present and correct.

  3. Remove conflicting files or directories in parent folders or your HOME folder:

  • package.json files
  • node_modules directories
  • npm artifacts

Yarn installation fails during monorepo setup

Cause: Incorrect yarn version, missing yarn installation, or conflicting configuration files.

Solution:

  1. Verify that you have yarn v2+:

    Copied to clipboard.

    yarn --version
    
  2. Uninstall yarn 1 (if present):

  3. Install Yarn using corepack (node versions 14+):

    Copied to clipboard.

    corepack enable
    
  4. In package.json, specify the correct package manager:

    Copied to clipboard.

    "packageManager": "yarn@x.y.z"
    
  5. Prepare yarn:

    Copied to clipboard.

    corepack prepare yarn@x.y.z --activate
    
  6. Create an empty yarn.lock file in the monorepo root.
  7. Remove conflicting files or directories in parent folders or your HOME folder:
  • package.json, package-lock.json, and yarn.lock
  • node_modules directories
  • npm artifacts

Build fails when installing Yarn dependencies

Cause: Incorrect yarn repository configuration or missing authentication tokens in .yarnrc.yml file.

Solution:

  1. Configure yarn repositories correctly (.yarnrc.yml file).

    For instructions, see Configure yarn workspaces.

  2. Add the following configuration to .yarnrc.yml as needed:

    Copied to clipboard.

    npmRegistries:
    "https://k-artifactory-external.labcollab.net/artifactory/api/npm/kepler-npm-prod-local/":
    npmAuthToken: "<KEPLER-TOKEN>"
    

Build fails in the packaging step when using Metro packager.

Cause: Metro packager can't resolve dependencies in the monorepo structure due to incorrect path configuration.

Solution: Configure dependencies in metro.config.js:

Copied to clipboard.

const path = require('path');

const config = {
    projectRoot: __dirname,
  watchFolders: [
    path.resolve(__dirname, '../../packages'),
    path.resolve(__dirname, '../../node_modules')
  ],
  resolver: {
    disableHierarchicalLookup: true,
    nodeModulesPaths: [
      path.resolve(__dirname, 'node_modules'),
      path.resolve(__dirname, '../../node_modules')
    ]
  }
};


Last updated: Sep 30, 2025