Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some hints on how to build? #340

Open
jakobw123 opened this issue May 3, 2024 · 0 comments
Open

Some hints on how to build? #340

jakobw123 opened this issue May 3, 2024 · 0 comments

Comments

@jakobw123
Copy link

jakobw123 commented May 3, 2024

Hey,

I am currently trying to build this project in order to add support for loading ink annotations (added with Zotero 7 Beta, similar to image annotations) as well as adding directories to the filename, which has been discussed and implemented here.

As I am totally new to the field of JS, TS and rushjs, I do not fully understand the build process. Even though you stated that this project is not ready for contribution, I would very much appreciate if you could give me a couple of hints on how to successfully build this project.

Atm I am doing the following:

  1. Installed Node.js (and npm) via nvm (Node Version Manager), Version: Node.js: 18.20.2, npm: 10.5.0
  2. Cloning & Submodule Init/Update
  3. npm install @microsoft/rush
  4. npm install
  5. rush update, which gives me some dependency errors:
monkey-around
    ^2.3.0
        @aidenlx/workerpool
        @aidenlx/zotero-helper
        @obzt/common
        zotero-obsidian-note
        zotlit
    ^2.3
        @ophidian/core

obsidian
    1.2.8
        @ophidian/core
    1.4.4
        zotlit
  1. Hacky fix:
    • monkey-around: Change 2.3 to 2.3.0 in ophidian-lib-core/package.json
    • obsidian: Change 1.4.4 to 1.2.8 in obsidian/package.json
  2. Hacky 'something' for ophidian/core which probably is not the correct workflow, but without it running rush build returns with an error saying that there is no build instruction in the scripts section of the package.json file.
    Added following to ophidian-lib-core/package.json:
"scripts": {
    "dev": "node ophidian.config.mjs dev",
    "build": "node ophidian.config.mjs production"
},
  • I feel like this is not the way one is supposed to use ophidian-lib-core. It also obviously explains the missing file error below. But I will leave the details in here to show what my current 'progress' of building this plugin is.
  1. rush build is successful for everything but ophidian/core and zotero-obsidian-note. Errors are logged as follows:

For ophidian/core:

node:internal/modules/cjs/loader:1143
  throw err;
  ^

Error: Cannot find module '/<path>/obsidian-zotlit/lib/ophidian-lib-core/ophidian.config.mjs'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
    at Module._load (node:internal/modules/cjs/loader:981:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []

Node.js v18.20.2
Returned error code: 1
"@ophidian/core" failed to build.
"zotlit" is blocked by "@ophidian/core".
}

For zotero-obsidian-note:

sh: 1: zt-build: not found
Returned error code: 127
"zotero-obsidian-note" failed to build.

Fail of zotero-obsidian-note is probably caused by a fail in the rush update command:

 WARN  Failed to create bin at /<path>/obsidian-zotlit/app/zotero/node_modules/.bin/zt-dev. ENOENT: no such file or directory, open '/<path>/obsidian-zotlit/lib/zotero-helper/dist/scripts/dev.js'
 WARN  Failed to create bin at /<path>/obsidian-zotlit/app/zotero/node_modules/.bin/zt-build. ENOENT: no such file or directory, open '/<path>/obsidian-zotlit/lib/zotero-helper/dist/scripts/build.js'
 WARN  Failed to create bin at /<path>/obsidian-zotlit/app/zotero/node_modules/.bin/zt-dev. ENOENT: no such file or directory, open '/<path>/obsidian-zotlit/app/zotero/node_modules/@aidenlx/zotero-helper/dist/scripts/dev.js'
 WARN  Failed to create bin at /<path>/obsidian-zotlit/app/zotero/node_modules/.bin/zt-build. ENOENT: no such file or directory, open '/<path>/obsidian-zotlit/app/zotero/node_modules/@aidenlx/zotero-helper/dist/scripts/build.js'
 WARN  Issues with peer dependencies found
../../lib/components
└─┬ class-variance-authority 0.4.0
  └── ✕ unmet peer typescript@">= 4.5.5 < 5": found 5.1.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant