Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.
This repository was archived by the owner on Mar 21, 2025. It is now read-only.

Bug while sharing scripts via node modules #108

Description

@taschetto
  • Versions:
    • scripty: 2.1.0
    • yarn: 1.22.18
    • OS: ubuntu 20.04

Actual Behavior

scripty can't find my scripts inside my helper module.

~/projects/my-project
❯ yarn lint
yarn run v1.22.18
$ scripty
scripty ERR! No script found for npm lifecycle 'lint' matching any of:
scripty ERR!   /home/taschetto/projects/my-project/script/lint+(|.*)
scripty ERR!   /home/taschetto/projects/my-project/script/lint/index+(|.*)
scripty ERR!   /home/taschetto/projects/my-project/script/lint/*
scripty ERR!   /home/taschetto/projects/my-project/node_modules/scripty/scripts/lint+(|.*)
scripty ERR!   /home/taschetto/projects/my-project/node_modules/scripty/scripts/lint/index+(|.*)
scripty ERR!   /home/taschetto/projects/my-project/node_modules/scripty/scripts/lint/*
scripty ERR! Either define a script or remove "scripty" from 'scripts.lint' in your package.json.
error Command failed with exit code 1.

Even though...

~/projects/my-projects
❯ ls -la ./node_modules/@my-org/node-scripts/scripts/lint 
total 16
drwxrwxr-x 2 taschetto taschetto 4096 jun 10 16:58 .
drwxrwxr-x 5 taschetto taschetto 4096 jun 10 16:58 ..
-rwxr-xr-x 1 taschetto taschetto   40 jun 10 16:58 fix
-rwxr-xr-x 1 taschetto taschetto  118 jun 10 16:58 index

Expected Behavior

The script should have been found.

my-projects/package.json

{
  // redacted
  "scripts": {
    "lint": "scripty",
  },
  // redacted
  "devDependencies": {
    "@my-org/node-scripts": "1.0.1",
    "scripty": "^2.1.0"
  },
  "config": {
    "scripty": {
      "modules": ["@my-org/node-scripts"]
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions