Skip to content

@logux/actions should probably be dependency instead of a devDependency #56

@michael42

Description

@michael42

When trying to run multiocular 0.8.1 through yarn with nodeLinker: "pnpm", it fails because it can't find @logux/actions:

$ mkdir test-yarn && cd test-yarn
$ corepack yarn@latest init
$ yarn config set nodeLinker pnpm
$ yarn add -D multiocular
$ yarn multiocular --version
node:internal/modules/package_json_reader:316
  throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), null);
        ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@logux/actions' imported from .../test-yarn/node_modules/.store/multiocular-npm-0.8.1-1e1612458b/package/common/api.js
    at Object.getPackageJSONURL (node:internal/modules/package_json_reader:316:9)
    at packageResolve (node:internal/modules/esm/resolve:768:81)
    at moduleResolve (node:internal/modules/esm/resolve:858:18)
    at defaultResolve (node:internal/modules/esm/resolve:990:11)
    at #cachedDefaultResolve (node:internal/modules/esm/loader:755:20)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:732:38)
    at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:317:38)
    at #link (node:internal/modules/esm/module_job:208:49) {
  code: 'ERR_MODULE_NOT_FOUND'
}

Node.js v24.9.0

Looking at the source, the error makes sense to me, since it's imported twice, but only declared as a devDependency. But I'm also a bit confused, because when installing it with pnpm, it does seem to work (even though its node_modules don't contain @logux/actions):

$ mkdir test-pnpm && cd test-pnpm
$ pnpm --init
$ pnpm add -D multiocular
$ ./node_modules/.bin/multiocular --version
v0.8.1
$ find node_modules/.pnpm/[email protected]/ -type l
node_modules/.pnpm/[email protected]/node_modules/highlight.js
node_modules/.pnpm/[email protected]/node_modules/marked
node_modules/.pnpm/[email protected]/node_modules/dompurify
node_modules/.pnpm/[email protected]/node_modules/diff2html
node_modules/.pnpm/[email protected]/node_modules/nanostores
node_modules/.pnpm/[email protected]/node_modules/yaml
node_modules/.pnpm/[email protected]/node_modules/@logux/server

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions