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

Resolving project files does not work anymore #323

Open
jvalkeejarvi opened this issue Jun 17, 2019 · 10 comments
Open

Resolving project files does not work anymore #323

jvalkeejarvi opened this issue Jun 17, 2019 · 10 comments

Comments

@jvalkeejarvi
Copy link

jvalkeejarvi commented Jun 17, 2019

Relevant Version Numbers

  • Tide: 20190614.1227
  • TypeScript: 3.2.4
  • Emacs: 26.2

Steps to Reproduce the Bug

  • create file html.d.ts with following content:
declare module '*.html';
  • don't import file anywhere in the project but make sure it gets included in project build by configuring tsconfig.json
  • import any .html file somewhere in project

Expected Behavior

Importing .html file works

Actual Behavior

Error Cannot find module './file-name.html'. [2307]

After opening file html.d.ts with Emacs errors are gone.

Importing .html files worked fine before upgrading tide. Could it be that upgrading tsserver broke something?

Also I have a similar problem with namespaces from some node_modules package. I get error first but after opening my Angular projects app.module.ts file (which imports practically everything else) namespace related errors are gone.

@ananthakumaran
Copy link
Owner

do you have typescript installed locally? Could you check what's the tsserver version with tide-verify-setup and see if downgrading typescript version solves the issue.

@jvalkeejarvi
Copy link
Author

Yes I have project local typescript installation. tide-verify-setup says that tsserver version is 3.2.4.

I noticed that tide-rename-symbol fails with following error :

Error: No Project.
    at Object.ThrowNoProject (/home/juuso/git/project/node_modules/typescript/lib/tsserver.js:119996:23)
    at IOSession.Session.getProjects (/home/juuso/git/project/node_modules/typescript/lib/tsserver.js:125084:42)
    at IOSession.Session.getRenameLocations (/home/juuso/git/project/node_modules/typescript/lib/tsserver.js:125101:37)
    at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (/home/juuso/git/project/node_modules/typescript/lib/tsserver.js:124288:61)
    at /home/juuso/git/project/node_modules/typescript/lib/tsserver.js:125836:88
    at IOSession.Session.executeWithRequestId (/home/juuso/git/project/node_modules/typescript/lib/tsserver.js:125827:28)
    at IOSession.Session.executeCommand (/home/juuso/git/project/node_modules/typescript/lib/tsserver.js:125836:33)
    at IOSession.Session.onMessage (/home/juuso/git/project/node_modules/typescript/lib/tsserver.js:125858:35)
    at Interface.<anonymous> (/home/juuso/git/project/node_modules/typescript/lib/tsserver.js:127118:27)
    at Interface.emit (events.js:198:13)
    at Interface._onLine (readline.js:308:10)
    at Interface._normalWrite (readline.js:451:12)
    at Socket.ondata (readline.js:165:10)
    at Socket.emit (events.js:198:13)
    at addChunk (_stream_readable.js:288:12)
    at readableAddChunk (_stream_readable.js:269:11)
    at Socket.Readable.push (_stream_readable.js:224:10)
    at Pipe.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)

Could these be related or should I open another issue?

@ananthakumaran
Copy link
Owner

could you share the output of M-x tide-verify-setup? These kinds of error usually means some issue at tsserver.

@jvalkeejarvi
Copy link
Author

tsserver version: 3.2.4

config file path: /home/juuso/git/enerkey2/front/tsconfig.json

Thanks a lot for quick response. I just realized that I have tsconfig.app.json which probably should be used instead.

@ananthakumaran
Copy link
Owner

is this an angular project?. This has come up before, but we don't have a good solution for this right now. tide can only support tsconfig.json. None of the other files are considered, so it's not going to work properly if tsconfig.json file is incomplete

@jvalkeejarvi
Copy link
Author

Angular project, yes. This is a little weird because last week everything worked fine and I have not updated anything in my project.

@ananthakumaran
Copy link
Owner

Do you know what's the old tide version? is it possible to rollback and confirm the issue is with tide?

@jvalkeejarvi
Copy link
Author

Unfortunately I don't remember the old version. Probably two weeks old at most. Should I just install some older version manually?

@lddubeau
Copy link
Collaborator

I don't know of any version of tide that was able to use tsconfig.app.json automatically. See #242 (comment) Point 2 in particular is extremely problematic.

@ananthakumaran
Copy link
Owner

ananthakumaran commented Jun 17, 2019

Unfortunately I don't remember the old version. Probably two weeks old at most. Should I just install some older version manually?

melpa might not work, you would have to probably clone the repo and checkout old version

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

3 participants