GNU bug report logs - #63944
Language grammer not working for Typescript (Emacs 30 , fedora)

Previous Next

Package: emacs;

Reported by: Rajan Paudel <rajan99702 <at> proton.me>

Date: Wed, 7 Jun 2023 11:57:02 UTC

Severity: normal

Merged with 63945

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 63944 in the body.
You can then email your comments to 63944 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#63944; Package emacs. (Wed, 07 Jun 2023 11:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rajan Paudel <rajan99702 <at> proton.me>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 07 Jun 2023 11:57:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Rajan Paudel <rajan99702 <at> proton.me>
To: "help-gnu-emacs <at> gnu.org" <help-gnu-emacs <at> gnu.org>,
 "emacs-devel <at> gnu.org" <emacs-devel <at> gnu.org>,
 "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>,
 "emacs-pretest-bug <at> gnu.org" <emacs-pretest-bug <at> gnu.org>
Subject: Language grammer not working for Typescript (Emacs 30 , fedora)
Date: Wed, 07 Jun 2023 11:18:59 +0000
[Message part 1 (text/plain, inline)]
Hello , i've a bug not working tree-sitter grammer for typescript .
When i open any typescript file i get this bug saying

```
⛔ Warning (comp): tramp-loaddefs.el.gz:754:2478: Warning: reference to free variable ‘tramp-remote-path’
⛔ Warning (treesit): Cannot activate tree-sitter, because language grammar for typescript is unavailable (symbol-error): /home/kali/.emacs.d/tree-sitter/libtree-sitter-typescript.so: undefined symbol: tree_sitter_typescript
⛔ Warning (treesit): Cannot activate tree-sitter, because language grammar for tsx is unavailable (not-found): (libtree-sitter-tsx libtree-sitter-tsx.0 libtree-sitter-tsx.0.0 libtree-sitter-tsx.so libtree-sitter-tsx.so.0 libtree-sitter-tsx.so.0.0) No such file or directory
⛔ Warning (treesit): Cannot activate tree-sitter, because language grammar for typescript is unavailable (symbol-error): /home/kali/.emacs.d/tree-sitter/libtree-sitter-typescript.so: undefined symbol: tree_sitter_typescript
```

I've already installed all required packages for tree-sitter in fedora.
Thank you for helping.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63944; Package emacs. (Wed, 07 Jun 2023 12:48:02 GMT) Full text and rfc822 format available.

Message #8 received at 63944 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Rajan Paudel <rajan99702 <at> proton.me>
Cc: 63944 <at> debbugs.gnu.org
Subject: Re: bug#63944: Language grammer not working for Typescript (Emacs 30 , 
 fedora)
Date: Wed, 07 Jun 2023 15:47:17 +0300
> Date: Wed, 07 Jun 2023 11:18:59 +0000
> From:  Rajan Paudel via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> Hello , i've a bug not working tree-sitter grammer for typescript . 

Thank you for your report.

However, please don't cross-post bug reports to multiple addresses, in
particular not to the two Emacs mailing lists, help-gnu-emacs and
emacs-devel.

> When i open any typescript file i get this bug saying 
> 
> ```
> ⛔ Warning (comp): tramp-loaddefs.el.gz:754:2478: Warning: reference to free variable
> ‘tramp-remote-path’
> ⛔ Warning (treesit): Cannot activate tree-sitter, because language grammar for typescript is
> unavailable (symbol-error): /home/kali/.emacs.d/tree-sitter/libtree-sitter-typescript.so: undefined
> symbol: tree_sitter_typescript
> ⛔ Warning (treesit): Cannot activate tree-sitter, because language grammar for tsx is unavailable
> (not-found): (libtree-sitter-tsx libtree-sitter-tsx.0 libtree-sitter-tsx.0.0 libtree-sitter-tsx.so
> libtree-sitter-tsx.so.0 libtree-sitter-tsx.so.0.0) No such file or directory
> ⛔ Warning (treesit): Cannot activate tree-sitter, because language grammar for typescript is
> unavailable (symbol-error): /home/kali/.emacs.d/tree-sitter/libtree-sitter-typescript.so: undefined
> symbol: tree_sitter_typescript
> 
> ```
> 
> I've already installed all required packages for tree-sitter in fedora. 

The error messages say Emacs cannot find the libraries in the specific
directories shown as part of the error message.  Are you saying the
libraries are in fact in /home/kali/.emacs.d/tree-sitter/, and Emacs
still doesn't find them?




Merged 63944 63945. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 07 Jun 2023 12:49:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63944; Package emacs. (Thu, 08 Jun 2023 04:31:05 GMT) Full text and rfc822 format available.

Message #13 received at 63944 <at> debbugs.gnu.org (full text, mbox):

From: Rajan Paudel <rajan99702 <at> proton.me>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Cc: "63944 <at> debbugs.gnu.org" <63944 <at> debbugs.gnu.org>
Subject: Re : Language grammer not working for Typescript (Emacs 30 , fedora)
Date: Wed, 07 Jun 2023 16:27:29 +0000
[Message part 1 (text/plain, inline)]
> The error messages say Emacs cannot find the libraries in the specific
> directories shown as part of the error message. Are you saying the
> libraries are in fact in /home/kali/.emacs.d/tree-sitter/, and Emacs
> still doesn't find them?

In that directory i can find `.so` for other , but not for typescript. Because of same error was coming i tried to use I had tried to use treesit-auto, which manually install treesitter , but it also failed ,while not for other languages i tried.

[image.png]

This error was only coming from `typescript-ts-mode` , I'm doing angular, i cant get ide features now for angular . Thank you for helping
[Message part 2 (text/html, inline)]
[image.png (image/png, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63944; Package emacs. (Thu, 08 Jun 2023 04:57:01 GMT) Full text and rfc822 format available.

Message #16 received at 63944 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Rajan Paudel <rajan99702 <at> proton.me>
Cc: 63944 <at> debbugs.gnu.org
Subject: Re: bug#63954: Re : Language grammer not working for Typescript
 (Emacs 30 , fedora)
Date: Thu, 08 Jun 2023 07:56:50 +0300
> Cc: "63944 <at> debbugs.gnu.org" <63944 <at> debbugs.gnu.org>
> Date: Wed, 07 Jun 2023 16:27:29 +0000
> From:  Rajan Paudel via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> > The error messages say Emacs cannot find the libraries in the specific
> > directories shown as part of the error message. Are you saying the
> > libraries are in fact in /home/kali/.emacs.d/tree-sitter/, and Emacs
> > still doesn't find them?
> 
> In that directory i can find `.so` for other , but not for typescript. Because of same error was coming i tried to use I had tried to use treesit-auto, which manually install treesitter , but it also failed ,while not for other languages i tried.

This means the *.so libraries you installed for typescript are not in
a directory where Emacs can find them.  Can you tell where they are,
and what are their names, i.e., show their full absolute file names on
your system?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63944; Package emacs. (Fri, 09 Jun 2023 06:28:02 GMT) Full text and rfc822 format available.

Message #19 received at 63944 <at> debbugs.gnu.org (full text, mbox):

From: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>
To: Rajan Paudel <rajan99702 <at> proton.me>, 63944 <at> debbugs.gnu.org
Cc: Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: Language grammer not working for Typescript (Emacs 30 , fedora)
Date: Fri, 9 Jun 2023 08:26:04 +0200
[Message part 1 (text/plain, inline)]
> In that directory i can find `.so` for other , but not for typescript. Because of same error was coming i tried to use I had tried to use treesit-auto, which manually install treesitter , but it also failed ,while not for other languages i tried.
>
> [image.png]
>
> This error was only coming from `typescript-ts-mode` , I'm doing angular, i cant get ide features now for angular . Thank you for helping

Try manually installing the grammar:

 * M-x treesit-install-language-grammar
 * Type "typescript"
 * Confirm you want an interactive install.
 * Use this url for language grammar:
   https://github.com/tree-sitter/tree-sitter-typescript

This is what I've done and it works for me.

--

Vennlig hilsen
*Jostein Kjønigsen*

jostein <at> kjonigsen.net 🍵 jostein <at> gmail.com
https://jostein.kjønigsen.no <https://jostein.kjønigsen.no>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63944; Package emacs. (Fri, 09 Jun 2023 19:53:01 GMT) Full text and rfc822 format available.

Message #22 received at 63944 <at> debbugs.gnu.org (full text, mbox):

From: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>
To: 63944 <at> debbugs.gnu.org, Rajan Paudel <rajan99702 <at> proton.me>
Subject: Fwd: Language grammer not working for Typescript (Emacs 30 , fedora)
Date: Fri, 9 Jun 2023 21:52:19 +0200
[Message part 1 (text/plain, inline)]
This follow-up somehow fell out of the bug-tracker thread.

Vennlig hilsen
*Jostein Kjønigsen*

jostein <at> kjonigsen.net 🍵 jostein <at> gmail.com
https://jostein.kjønigsen.no <https://jostein.kjønigsen.no>


-------- Forwarded Message --------
Subject: 	Re: Language grammer not working for Typescript (Emacs 30 , 
fedora)
Date: 	Fri, 9 Jun 2023 15:40:46 +0200
From: 	Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>
Reply-To: 	jostein <at> kjonigsen.net
To: 	Rajan Paudel <rajan99702 <at> proton.me>, jostein <at> kjonigsen.net



tsx is a different grammar and needs to be generated/compiled seperately.

Vennlig hilsen
*Jostein Kjønigsen*

jostein <at> kjonigsen.net 🍵 jostein <at> gmail.com
https://jostein.kjønigsen.no <https://jostein.kjønigsen.no>
On 6/9/23 15:28, Rajan Paudel wrote:
> ah it worked, problem was in that `parser.c` library, Somehow , 
> treesit didnt detected  parser.c for typescript even if i typed it,  i 
> had left default which was reason it didnt found library and gave
> Enter the subdirectory in which the parser.c file resides (default: 
> "src"):
>
> ``
> ⛔ Warning (treesit): Error encountered when installing language 
> grammar: (file-missing Setting current directory No such file or 
> directory /tmp/treesit-workdir5YrpTB/repo/src)
> ```
> I later clone https://github.com/tree-sitter/tree-sitter-typescript 
> directly and gave location to 
> `~/tree-sitter-typescript/typescript/src` where parser resides
>
> Now i have successfully generated typescript.so .
>
> I can run now `typescript-ts-mode` after enabling it
> though it still throwing error when enabling it
> ⛔ Warning (treesit): Cannot activate tree-sitter, because language 
> grammar for tsx is unavailable (not-found): (libtree-sitter-tsx 
> libtree-sitter-tsx.0 libtree-sitter-tsx.0.0 libtree-sitter-tsx.so 
> <http://libtree-sitter-tsx.so> libtree-sitter-tsx.so.0 
> libtree-sitter-tsx.so.0.0) No such file or directory
>
> ------- Original Message -------
> On Friday, June 9th, 2023 at 10:26 AM, Jostein Kjønigsen 
> <jostein <at> secure.kjonigsen.net> wrote:
>
>> > In that directory i can find `.so` for other , but not for typescript. Because of same error was coming i tried to use I had tried to use treesit-auto, which manually install treesitter , but it also failed ,while not for other languages i tried.
>> >
>> > [image.png]
>> >
>> > This error was only coming from `typescript-ts-mode` , I'm doing angular, i cant get ide features now for angular . Thank you for helping
>> Try manually installing the grammar:
>>
>>   * M-x treesit-install-language-grammar
>>   * Type "typescript"
>>   * Confirm you want an interactive install.
>>   * Use this url for language grammar:
>>     https://github.com/tree-sitter/tree-sitter-typescript
>>
>> This is what I've done and it works for me.
>>
>> --
>> Vennlig hilsen
>> *Jostein Kjønigsen*
>>
>> jostein <at> kjonigsen.net 🍵 jostein <at> gmail.com
>> https://jostein.kjønigsen.no <https://jostein.kjønigsen.no>
>>
>
[Message part 2 (text/html, inline)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 10 Jun 2023 05:31:01 GMT) Full text and rfc822 format available.

Notification sent to Rajan Paudel <rajan99702 <at> proton.me>:
bug acknowledged by developer. (Sat, 10 Jun 2023 05:31:02 GMT) Full text and rfc822 format available.

Message #27 received at 63944-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: jostein <at> kjonigsen.net
Cc: rajan99702 <at> proton.me, 63944-done <at> debbugs.gnu.org
Subject: Re: bug#63944: Fwd: Language grammer not working for Typescript
 (Emacs 30 , fedora)
Date: Sat, 10 Jun 2023 08:30:19 +0300
> Date: Fri, 9 Jun 2023 21:52:19 +0200
> From: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>
> 
> This follow-up somehow fell out of the bug-tracker thread.

Thanks, so I understand the problem was solved, and I'm closing this
bug.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 10 Jun 2023 05:31:02 GMT) Full text and rfc822 format available.

Notification sent to Rajan Paudel <rajan99702 <at> proton.me>:
bug acknowledged by developer. (Sat, 10 Jun 2023 05:31:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 08 Jul 2023 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 286 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.