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

atom.grammars.startIdForScope is not a function #1035

Open
cephen opened this issue Nov 15, 2018 · 2 comments
Open

atom.grammars.startIdForScope is not a function #1035

cephen opened this issue Nov 15, 2018 · 2 comments

Comments

@cephen
Copy link

cephen commented Nov 15, 2018

I have already gone through the steps mentioned in #1020 with no success.

Atom 1.32.2 x64 running on Manjaro Linux

Steps: Installed omnisharp-atom package via apm

atom.grammars.startIdForScope is not a function in /usr/lib/atom/node_modules/language-csharp/grammars/csharp.json

TypeError: atom.grammars.startIdForScope is not a function
    at grammarCb (/home/fluxx/.atom/packages/omnisharp-atom/dist/omnisharp-atom.js:145:35)
    at Function.simpleDispatch (/usr/lib/atom/node_modules/event-kit/dist/emitter.js:64:14)
    at Emitter.emit (/usr/lib/atom/node_modules/event-kit/dist/emitter.js:257:28)
    at GrammarRegistry.module.exports.GrammarRegistry.addGrammar (/usr/lib/atom/node_modules/first-mate/lib/grammar-registry.js:80:20)
    at Grammar.module.exports.Grammar.activate (/usr/lib/atom/node_modules/first-mate/lib/grammar.js:247:48)
    at grammarRegistry.readGrammar (/usr/lib/atom/src/package.js:611:47)
    at CSON.readFile (/usr/lib/atom/src/grammar-registry.js:515:9)
    at parseContents (/usr/lib/atom/node_modules/season/lib/cson.js:119:7)
    at /usr/lib/atom/node_modules/season/lib/cson.js:226:20
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
  at /usr/lib/atom/node_modules/language-csharp/grammars/csharp.json:1:1

atom.grammars.startIdForScope is not a function in /usr/lib/atom/node_modules/language-csharp/grammars/csx.json

TypeError: atom.grammars.startIdForScope is not a function
    at grammarCb (/home/fluxx/.atom/packages/omnisharp-atom/dist/omnisharp-atom.js:145:35)
    at Function.simpleDispatch (/usr/lib/atom/node_modules/event-kit/dist/emitter.js:64:14)
    at Emitter.emit (/usr/lib/atom/node_modules/event-kit/dist/emitter.js:257:28)
    at GrammarRegistry.module.exports.GrammarRegistry.addGrammar (/usr/lib/atom/node_modules/first-mate/lib/grammar-registry.js:80:20)
    at Grammar.module.exports.Grammar.activate (/usr/lib/atom/node_modules/first-mate/lib/grammar.js:247:48)
    at grammarRegistry.readGrammar (/usr/lib/atom/src/package.js:611:47)
    at CSON.readFile (/usr/lib/atom/src/grammar-registry.js:515:9)
    at parseContents (/usr/lib/atom/node_modules/season/lib/cson.js:119:7)
    at /usr/lib/atom/node_modules/season/lib/cson.js:226:20
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
  at /usr/lib/atom/node_modules/language-csharp/grammars/csx.json:1:1
@brunnopleffken
Copy link

Having this same issue on Atom 1.33.1 on MacOS Mojave.
My stack trace:

TypeError: atom.grammars.startIdForScope is not a function
    at grammarCb (/Users/brunnopleffken/.atom/packages/omnisharp-atom/dist/omnisharp-atom.js:145:35)
    at arrayEach (/Users/brunnopleffken/.atom/packages/omnisharp-atom/node_modules/lodash/lodash.js:516:11)
    at forEach (/Users/brunnopleffken/.atom/packages/omnisharp-atom/node_modules/lodash/lodash.js:9344:14)
    at OmniSharpAtom.activate (/Users/brunnopleffken/.atom/packages/omnisharp-atom/dist/omnisharp-atom.js:153:30)
    at Package.activateNow (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:2951735)
    at measure (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:2951147)
    at Package.measure (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:2948778)
    at activationPromise.activationPromise.Promise (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:2951007)
    at new Promise (<anonymous>)
    at Package.activate (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:2950950)
    at PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:382657)
    at /Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:917626
    at r (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:912232)
    at o (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:1037481)
    at ChildProcess.n.process.on.e (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:1037687)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)

@HYAR7E
Copy link

HYAR7E commented Apr 24, 2020

This solution worked for me
#1020 (comment)

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