https://www.dendron.so/ logo
Join Discord
Powered by
# dev
  • h

    huland

    04/15/2022, 12:51 AM
    Hello, I try to setup the environment following these steps: [Plugin Quickstart](https://docs.dendron.so/notes/64f0e2d5-2c83-43df-9144-40f2c68935aa/) but when I run
    yarn setup
    it fails with:
    Copy code
    $ node scripts/buildStyles.js
    fetching...
    reading...
    compile...
    done
    $ npx lerna run build --scope "@dendronhq/plugin-core"
    $ yarn compile
    $ tsc -p tsconfig.build.json 
    $ npx yarn dendron dev sync_assets --fast
    $ node packages/dendron-cli/lib/bin/dendron-cli.js dev sync_assets --fast
    sync static...
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    /home/huland/src/js/dendron/node_modules/execa/index.js:212
            throw error;
            ^
    
    Error: Command failed with exit code 1: npx yarn dendron dev sync_assets --fast
    The versions installed: node -v v16.14.2 node -v v16.14.2 npm -v 8.6.0 lerna -v 4.0.0 yarn -v 1.22.18 Do you have any idea what could be the problem?
  • s

    SeriousBug

    04/15/2022, 12:53 AM
    Could you try running these two steps separately?
    Copy code
    $ yarn bootstrap:bootstrap
    $ yarn bootstrap: build
    Also if you could share what OS you're using
  • h

    huland

    04/15/2022, 12:56 AM
    My OS is: Linux Mint 19.3 Tricia The
    yarn bootstrap:bootstrap
    was successful, the other is still running
  • h

    huland

    04/15/2022, 12:57 AM
    The
    yarn bootstrap:build
    fails on my machine.
  • s

    SeriousBug

    04/15/2022, 12:59 AM
    Is it the same error?
  • h

    huland

    04/15/2022, 12:59 AM
    Yes it's.
  • k

    kevins8

    04/15/2022, 1:00 AM
    can you run
    node packages/dendron-cli/lib/bin/dendron-cli.js dev sync_assets --fast
    command by itself?
  • h

    huland

    04/15/2022, 1:02 AM
    Yes , it fails.
  • k

    kevins8

    04/15/2022, 1:06 AM
    is there an error log when it fails? you can see more detailed logging if you run
    LOG_LEVEL=debug {CMD}
  • h

    huland

    04/15/2022, 1:08 AM
    It's 611 line in total, should I paste it here?
  • k

    kevins8

    04/15/2022, 1:14 AM
    sure, discord will upload it as a txt file if it exceeds the limit
  • h

    huland

    04/15/2022, 1:16 AM
    LOG_LEVEL=debug node packages/dendron-cli/lib/bin/dendron-cli.js dev sync_assets --fast
  • h

    huland

    04/15/2022, 1:16 AM
    yarn bootstrap:build output
  • k

    kevins8

    04/15/2022, 1:26 AM
    hmm, it looks like there's an issue with the segment client. can you confirm that your ssl certs are up to date? also - sync assets is the last step in the build process. it syncs static html assets but shouldn't be needed for development depending on what part of dendron your working on
  • h

    huland

    04/15/2022, 1:28 AM
    Thanks. I don't think for the issue I plan to work needs any assets. I will try to check my ssl certs but I don't know exactly where should I check them so I'll google it.
  • h

    huland

    04/15/2022, 1:37 AM
    I googled
    api.segment.io
    google suggested pihole to the end.. so I checked my pihole and it was blocked :/ thanks for the help really. Next time I'll check that as well before asking.
    Copy code
    ...
    $ npx yarn dendron dev sync_assets --fast
    $ node packages/dendron-cli/lib/bin/dendron-cli.js dev sync_assets --fast
    sync static...
    done
    $ ./bootstrap/scripts/chmod-cli.js
    made  /home/huland/src/js/dendron/packages/dendron-cli/lib/bin/dendron-cli.js  executable
    Done in 227.38s.
  • m

    Maxotronic

    04/16/2022, 2:33 AM
    Can anyone confirm a regression on master for me? Running the following:
    Copy code
    $ ./bootstrap/scripts/watch.sh
    Copy code
    test-workspace/$ ./scripts/dev.sh
    Copy code
    packages/dendron-plugin-views/$ env REACT_APP_VIEW_NAME=DendronGraphPanelView yarn start
    In the browser I get this:
    Copy code
    Error{"stack":"Error: Request failed with status code 404\n    at createError (http://localhost:3000/static/js/bundle.js:136005:15)\n    at settle (http://localhost:3000/static/js/bundle.js:136239:12)\n    at XMLHttpRequest.onloadend (http://localhost:3000/static/js/bundle.js:135408:7)","message":"Request failed with status code 404","config":{}}
  • k

    kevins8

    04/16/2022, 2:52 AM
    can repro
  • k

    kevins8

    04/16/2022, 3:13 AM
    fix for it in https://github.com/dendronhq/dendron/pull/2774 -> feel free to add the line in the meanwhile
  • k

    kevins8

    04/16/2022, 3:13 AM
    @User ☝️
  • m

    Maxotronic

    04/20/2022, 6:23 AM
    That error's now fixed but the latest commit https://github.com/dendronhq/dendron/commit/bad48bea80e28a88c3b900347ad2caba55e13e19 makes only the calendarPanelView show (can't be overridden by env).
  • m

    Maxotronic

    04/20/2022, 6:23 AM
    I can't figure out what makes it happen, the diff looks fine to me
  • m

    Maxotronic

    04/20/2022, 6:23 AM
    possibly this? https://github.com/dendronhq/dendron/commit/bad48bea80e28a88c3b900347ad2caba55e13e19#diff-6e0439434931d471175990ddab8820f91abbf8e960b559a91f04a6344688358b
  • k

    kevins8

    04/20/2022, 2:22 PM
    fix for it here > https://github.com/dendronhq/dendron/pull/2791 feel free to apply locally for now
  • n

    Nidoling

    04/20/2022, 6:38 PM
    @kevins8 is this safe to remove? https://github.com/dendronhq/dendron/blob/master/packages/engine-server/src/cache/gitCache.ts. I'm also thinking of creating a cache interface to be implemented by the notescache and future backlinkscache
  • k

    kevins8

    04/20/2022, 6:48 PM
    looks like it. don't see anything pointing to it
  • h

    huland

    04/20/2022, 10:06 PM
    Hello Could someone help me please with a test case? I'm trying to add a test case to cover the fix I've made: [PR link](https://github.com/dendronhq/dendron/pull/2789) I try to add the test case at this [location](https://github.com/dendronhq/dendron/blob/master/packages/plugin-core/src/test/suite-integ/InsertNoteIndexCommand.test.ts#L41) of the code. The test case:
    Copy code
    typescript
    test("basic tag", (done) => {
      runLegacyMultiWorkspaceTest({
        ctx,
        preSetupHook: async ({ wsRoot, vaults }) => {
          await ENGINE_HOOKS.setupBasic({ wsRoot, vaults });
        },
        onInit: async ({ engine }) => {
          const notes = engine.notes;
          const cmd = new InsertNoteIndexCommand();
    
          await WSUtils.openNote(notes["tags.example"]);
          const editor = VSCodeUtils.getActiveTextEditorOrThrow();
          editor.selection = new vscode.Selection(9, 0, 9, 0);
          await cmd.execute({});
          const body = editor.document.getText();
          expect(
            await AssertUtils.assertInString({
              body,
              match: [["## Index", "- [[Tags|tags]]"].join("\n")],
            })
          );
          done();
        },
      });
    });
    I tryed to debug the line where I call
    openNote
    . There is no
    tags
    nor
    tags.example
    inside
    notes
    . I tried to understand the
    setupBasic
    function [here](https://github.com/dendronhq/dendron/blob/master/packages/engine-test-utils/src/presets/engine-server/utils.ts#L22) as well but until now I haven't found out where / how the [node structure](https://github.com/dendronhq/dendron/blob/master/packages/engine-test-utils/src/presets/engine-server/utils.ts#L15) is defined, because I was thinking to extend that "list" by adding the
    tags.example
    note so my test would work -or at least would do something-
  • k

    kevins8

    04/20/2022, 10:38 PM
    The preset functions creates a sample workspace with a set of notes. For example, using
    setupBasic
    will create a workspace with the following notes
    Copy code
    - foo
    - foo.ch1
    - bar
    You can reference these notes by their title using
    engine.notes
    Copy code
    ts
    const fooNote = engine.notes["foo"];
    It can be hard to navigate to the correct file using vscode. The preset functions are located in [[../packages/engine-test-utils/src/presets/engine-server/utils.ts]] and the low level presets are in [[../packages/common-test-utils/src/presets/notes.ts]]
  • k

    kevins8

    04/20/2022, 10:44 PM
    if you need to create custom notes (which you'll probably want to do in this case), you can use the following function
    Copy code
    ts
    await NoteTestUtilsV4.createNote({
        wsRoot,
        vault,
        fname: "alpha",
        body: [`# H1`, `# H2`, `# H3`, "", "Some Content"].join("\n"),
    });
  • h

    huland

    04/20/2022, 11:00 PM
    Thanks for the help I'll try to understand these files better.
1...9899100...108Latest