atom / language-csharp

C# language support for Atom
Other
62 stars 52 forks source link

Failed to load a language-csharp package grammar #129

Closed cuongyknb103 closed 5 years ago

cuongyknb103 commented 5 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.38.2 x64 Electron: 2.0.18 OS: Ubuntu 19.04 Thrown From: language-csharp package 1.1.0

Stack Trace

Failed to load a language-csharp package grammar

At atom.grammars.startIdForScope is not a function in /usr/share/atom/resources/app.asar/node_modules/language-csharp/grammars/csharp.json

TypeError: atom.grammars.startIdForScope is not a function
    at grammarCb (/packages/omnisharp-atom/dist/omnisharp-atom.js:145:35)
    at Function.simpleDispatch (/usr/share/atom/resources/app/static/<embedded>:11:1206583)
    at Emitter.emit (/usr/share/atom/resources/app/static/<embedded>:11:1208024)
    at GrammarRegistry.t.exports.GrammarRegistry.addGrammar (/usr/share/atom/resources/app/static/<embedded>:14:113518)
    at Grammar.t.exports.Grammar.activate (/usr/share/atom/resources/app/static/<embedded>:14:120700)
    at grammarRegistry.readGrammar (/usr/share/atom/resources/app/static/<embedded>:11:3424609)
    at l.readFile (/usr/share/atom/resources/app/static/<embedded>:11:358746)
    at u (/usr/share/atom/resources/app/static/<embedded>:11:578696)
    at /usr/share/atom/resources/app/static/<embedded>:11:579949
    at ELECTRON_ASAR.js:530:9
    at FSReqWrap.wrapper [as oncomplete] (fs.js:658:17)
  at /app.asar/node_modules/language-csharp/grammars/csharp.json:1:1

Commands

Non-Core Packages

linter 2.3.0 
omnisharp-atom 0.31.2 
rsese commented 5 years ago

Thanks for contributing!

It appears that this is being caused by the https://github.com/OmniSharp/omnisharp-atom package, not Atom itself. It may be that there is still a bug in Atom. If so, we'll need the maintainer of the package that is causing the problem to help track that down. You should file this issue on their repository so they can either fix the problem or tell us where the problem is coming from. The Atom FAQ has information on how to contact the maintainers of any Atom community package or theme.

junipertwig commented 4 years ago

I'm having the same issue as cuongyknb103 and it's almost october, is anyone trying to solve this issue?

Louvtt commented 3 years ago

I've fix the issue by using the method seen here : https://github.com/OmniSharp/omnisharp-atom/issues/1037#issuecomment-487233117 After you did all of the modifications you just need to reload Atom and it should be fixed.