tide
tide copied to clipboard
Resolving project files does not work anymore
Relevant Version Numbers
- Tide: 20190614.1227
- TypeScript: 3.2.4
- Emacs: 26.2
Steps to Reproduce the Bug
- create file
html.d.tswith 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
.htmlfile 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.
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.
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?
could you share the output of M-x tide-verify-setup? These kinds of error usually means some issue at tsserver.
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.
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
Angular project, yes. This is a little weird because last week everything worked fine and I have not updated anything in my project.
Do you know what's the old tide version? is it possible to rollback and confirm the issue is with tide?
Unfortunately I don't remember the old version. Probably two weeks old at most. Should I just install some older version manually?
I don't know of any version of tide that was able to use tsconfig.app.json automatically. See https://github.com/ananthakumaran/tide/issues/242#issuecomment-408995380 Point 2 in particular is extremely problematic.
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