INNER CODE UNIT · TypeScript

validateSdkPrereq

hypermodeinc/modus · cli/src/commands/new/index.ts:179

  private async validateSdkPrereq(sdk: string) {
    const sdkText = `Modus ${sdk} SDK`;
    switch (sdk) {
      case SDK.AssemblyScript:
        if (semver.lt(process.versions.node, MinNodeVersion)) {
          this.logError(`The ${sdkText} requires Node.js version ${MinNodeVersion} or newer.`);
          this.logError(`You have Node.js version ${process.versions.node}.`);
          this.logError(`Please upgrade Node.js and try again.`);
          this.exit(1);
        }
        break;
      case SDK.Go: {
        const goVersion = await getGoVersion();
        const tinyGoVersion = await getTinyGoVersion();
        const binaryenVersion = await getBinaryenVersion();

        const foundGo = !!goVersion;
        const foundTinyGo = !!tinyGoVersion;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…