Skip to content

jsii-config produces non working configuration #4705

Open
@ganeshltimindtree

Description

@ganeshltimindtree

Describe the bug

I am getting started with jsii. I facing an issue when running npm run build. Below is my jsii configuration as created by jsii-config

  "...",
  "keywords": [],
  "author": {
    "name": "Ganesh Kumar",
    "email": "[email protected]"
  },
  "repository": {
    "url": "https://github.com/ganesh/jsii-getting-started.git"
  },
  "license": "ISC",
  "stability": "stable",
  "types": "index.d.ts",
  "jsii": {
    "versionFormat": "full",
    "targets": {
      "java": {
        "package": "com.ganesh.learn.jsii",
        "maven": {
          "groupId": "com.ganesh.learn",
          "artifactId": "jsii"
        }
      }
    },
    "tsc": {
      "outDir": "dist"
    }
  },
  "devDependencies": {
    "jsii": "^5.5.9",
    "jsii-pacmak": "^1.104.0"
  }
}

The error I am getting is

[2024-11-10T12:04:33.432] [ERROR] jsii/compiler - Type model errors prevented the JSII assembly from being created
error JSII4: Could not find "main" file: C:\Workspace\internal\index.ts

The project is in C:\Workspace\internal\jsii-getting-started. It seems jsii is looking at the parent directory rather than the project directory.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

jsii should generate Java files

Current Behavior

I am getting this error

[2024-11-10T12:04:33.432] [ERROR] jsii/compiler - Type model errors prevented the JSII assembly from being created
error JSII4: Could not find "main" file: C:\Workspace\internal\index.ts

Reproduction Steps

Follow the steps listed in the documentation to create a sample project. Run the command npm run build. You will get the error in Windows 11 enterprise

Possible Solution

None

Additional Information/Context

No response

SDK version used

jsii: 5.5.9 & jsii-pacmak: 1.104.0

Environment details (OS name and version, etc.)

Windows 11 Enterprise

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.p1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions