diff --git a/packages/create-fuels/src/lib/getPackageManager.ts b/packages/create-fuels/src/lib/getPackageManager.ts index f4893d37c9..fcbc60fc84 100644 --- a/packages/create-fuels/src/lib/getPackageManager.ts +++ b/packages/create-fuels/src/lib/getPackageManager.ts @@ -1,3 +1,5 @@ +import { warn } from '../utils/logger'; + export const availablePackageManagers = ['pnpm', 'npm', 'bun'] as const; export type PackageManager = (typeof availablePackageManagers)[number]; @@ -42,6 +44,12 @@ export function getUserPkgManager(): PackageManager { return packageMangers.bun.name; } + if (userAgent.startsWith(packageMangers.npm.name)) { + return packageMangers.npm.name; + } + + warn(`This package manager is not supported. Using npm instead.`); + return packageMangers.npm.name; }