Skip to content

[BUG] napi manifest generate does not create napi_out folder #157

Open
@rubenhorn

Description

@rubenhorn

Description

Running napi manifest generate does not create the napi_out folder.
The command was run under [user] in a directory with permissions drwxrwxr-x owned by [user]:[user].

Expected Behavior

Running napi manifest generate creates a new empty folder napi_out if it does not exist

Actual Behavior

Output:

[...]
generatePythonDependencyManifest: 1367ms
💾 Writing manifest to: [project path]/napi_out/napi-manifest.json
❌ Failed to generate manifest
   Error: No such file or directory (os error 2): writefile '[project path]/napi_out/napi-manifest.json'

💡 Common solutions:
   • Check that your project files are accessible
   • Verify your .napirc configuration
   • Ensure you have write permissions to the output directory

After manually creating the folder using mkdir napi_out, the command successfully completes without error.

Possible Fix

The folder should be created first before writing the manifest file.
(Since the file structure on the main branch is significantly different to the release tag, I suspect that this may have already been resolved? 🤔 If so, feel free to just close this issue immediately. 🤷‍♂️)

Steps to Reproduce/Context

Follow the steps from the documentation for an existing python project.

Your Environment

  • Version used: napi 1.0.10
  • Operating System and version: Ubuntu 24.04.2 LTS (6.8.0-60-generic SMP PREEMPT_DYNAMIC x86_64 GNU/Linux)

Config File

{
  "language": "python",
  "project": {
    "include": [
      "[root python module]/**/*.py"
    ],
    "exclude": [
      "napi_out/**",
      ".git/**",
      "**/dist/**",
      "**/build/**",
      "**/__pycache__/**",
      "**/*.pyc",
      "**/.pytest_cache/**",
      "**/venv/**",
      "**/.env/**",
      "**/*.egg-info/**",
      "**/.tox/**",
      "**/.coverage",
      "**/htmlcov/**",
      "**/.mypy_cache/**"
    ]
  },
  "outDir": "napi_out",
  "metrics": {
    "file": {
      "maxCodeChar": 100000,
      "maxChar": 100000,
      "maxCodeLine": 1000,
      "maxLine": 1000,
      "maxDependency": 10,
      "maxDependent": 10,
      "maxCyclomaticComplexity": 100
    },
    "symbol": {
      "maxCodeChar": 50000,
      "maxChar": 50000,
      "maxCodeLine": 500,
      "maxLine": 500,
      "maxDependency": 5,
      "maxDependent": 5,
      "maxCyclomaticComplexity": 50
    }
  },
  "python": {
    "version": "3.12"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions