Skip to content

Conversation

coadler
Copy link
Contributor

@coadler coadler commented Oct 4, 2023

For some reason this fails when imported into vscode-coder.

ERROR in /home/coder/vscode-coder/node_modules/coder/site/src/api/api.ts
./node_modules/coder/site/src/api/api.ts 6:22-35
[tsl] ERROR in /home/coder/vscode-coder/node_modules/coder/site/src/api/api.ts(6,23)
      TS2307: Cannot find module 'utils/delay' or its corresponding type declarations.

After changing the import to add ../xxx the error went away. I don't
really understand why.

For some reason this fails when imported into `vscode-coder`.

```
ERROR in /home/coder/vscode-coder/node_modules/coder/site/src/api/api.ts
./node_modules/coder/site/src/api/api.ts 6:22-35
[tsl] ERROR in /home/coder/vscode-coder/node_modules/coder/site/src/api/api.ts(6,23)
      TS2307: Cannot find module 'utils/delay' or its corresponding type declarations.
```

After changing the import to add `../xxx` the error went away. I don't
really understand why.
@coadler
Copy link
Contributor Author

coadler commented Oct 4, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@coadler coadler changed the title fix(site/api): change utils/delay import path fix(site): change utils/delay import path Oct 4, 2023
@coadler coadler requested review from aslilac and kylecarbs October 4, 2023 20:52
@aslilac
Copy link
Member

aslilac commented Oct 4, 2023

I think it'd be kinda nice to have a separate TS api package that we can pull out of site/ so that we don't have to deal with weird build things like this in vscode-coder, or wherever else we need TS

@coadler coadler merged commit d504044 into main Oct 4, 2023
@coadler coadler deleted the colin/fixsite/apichangeutils/delayimportpath branch October 4, 2023 22:15
@github-actions github-actions bot locked and limited conversation to collaborators Oct 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants