Skip to content

Doesn't find any scripts #102

@cstenkamp

Description

@cstenkamp

See what #97, #98 and #99 said. I did it exactly as in the sample. Maybe it would be helpful to not close the issue after an answer by you, but let the people that originally raised the issue decide if it is resolved or not.
I do not have it in a code block, I tried setting only the Folder or individual files, I am doing with nothing but your example

class CoolString {
    coolify(s) {
        return `😎 ${s} 😎`
    }
}

and yet, no js-file is found, and the block

// dataviewjs block in *.md
\`\`\`dataviewjs
const {CoolString} = await cJS()
dv.list(dv.pages().file.name.map(n => CoolString.coolify(n)))
\`\`\`

only gives

Evaluation Error: TypeError: Cannot read properties of undefined (reading 'coolify')
    at eval (eval at <anonymous> (plugin:dataview), <anonymous>:2:50)
    at Array.map (<anonymous>)
    at Proxy.map (plugin:dataview:8381:39)
    at eval (eval at <anonymous> (plugin:dataview), <anonymous>:2:30)

Help would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions