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

Unable to import @typedef #93

Open
xlozano-newrelic opened this issue Sep 26, 2019 · 1 comment
Open

Unable to import @typedef #93

xlozano-newrelic opened this issue Sep 26, 2019 · 1 comment

Comments

@xlozano-newrelic
Copy link

I have a file utils.js with:

/**
 * @typedef Location
 *
 * @property {string} pathname
 * @property {string} search
 * @property {string} hash
 */

On another file, I'm trying to do:

/**
 * @typedef {import('../../../../../utils').Location} Location
 */

But I'm getting this error:

[docs:build] SyntaxError: Invalid regular expression: /[~]import('../../../../.$/: Unterminated group
    at new RegExp (<anonymous>)
    at IdentifiersDocBuilder._findByName (/test/node_modules/esdoc-publish-html-plugin/out/src/Builder/DocBuilder.js:117:20)
    at IdentifiersDocBuilder._findByName (/test/node_modules/esdoc-publish-html-plugin/out/src/Builder/DocBuilder.js:132:30)
    at IdentifiersDocBuilder._findByName (/test/node_modules/esdoc-publish-html-plugin/out/src/Builder/DocBuilder.js:132:30)
    at IdentifiersDocBuilder._buildDocLinkHTML (/test/node_modules/esdoc-publish-html-plugin/out/src/Builder/DocBuilder.js:785:22)
    at IdentifiersDocBuilder._buildTypeDocLinkHTML (/test/node_modules/esdoc-publish-html-plugin/out/src/Builder/DocBuilder.js:767:19)
    at IdentifiersDocBuilder._buildSignatureHTML (/test/node_modules/esdoc-publish-html-plugin/out/src/Builder/DocBuilder.js:871:34)
    at /test/node_modules/esdoc-publish-html-plugin/out/src/Builder/DocBuilder.js:338:34
    at IceCap.loop (/test/node_modules/ice-cap/out/src/IceCap.js:261:9)
    at IdentifiersDocBuilder._buildSummaryDoc (/test/node_modules/esdoc-publish-html-plugin/out/src/Builder/DocBuilder.js:334:9)

I understand that the error is related to the relative path, is there any workaround to this?

@hudsonansley
Copy link

We're running into the same issue. I see this was posted quite a while ago with no response so far. Any possibility this can get some attention?

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

2 participants