salesforce-ux / theo

Theo is a an abstraction for transforming and formatting Design Tokens

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Import support for node_modules not working as expected

morewry opened this issue · comments

I've got theo@7.0.1 and have this import configured:

{
  "imports": [
    "@collectivehealth/dls-colors"
  ]
}

I'm getting this error:

💩  Oops, something went wrong: Error: ENOENT: no such file or directory, open '/Users/rachael.moore/Projects/dls/components/dls-button/@collectivehealth/dls-colors'

The error makes this import appear to not be importing as an npm module, but instead as a relative file path. Any thoughts?

I'll try to take a look at this. We're currently using https://github.com/sindresorhus/resolve-from to resolve imports, but it might not be taking scoped modules into account. It might be good if we can make a simple test case and submit a PR to resolve-from to support this functionality.

I'll try to make some time to check that out, too, and file there/update here if I do.

I think this got fixed; I tried it again recently and had no trouble this time.