atom-tern icon indicating copy to clipboard operation
atom-tern copied to clipboard

Tern errors on Atom Windows build

Open ReginaldasR opened this issue 10 years ago • 4 comments

I am not sure if its tern plugin or windows alpha build problem, tern fails with those errors.

tern_error

ReginaldasR avatar Aug 21 '14 09:08 ReginaldasR

Same here, it says "Uncaught TypeError: Cannot read property 'update' of null"

Windows 7 64bit Atom 0.138.0

rubenmv avatar Oct 22 '14 11:10 rubenmv

Change BufferedNodeProcess to BufferedProcess in Tern/lib/server.coffee should fix that error.

anhhh11 avatar Nov 28 '14 13:11 anhhh11

Well, after changing anhhh11's suggestion, I got this: "Uncaught ReferenceError: BufferedProcess is not defined"

dreamcryer avatar Dec 05 '14 01:12 dreamcryer

server.coffee after editing:

{BufferedProcess} = require 'atom'

module.exports = ->
    process = null
    start = (cb)->
        path = require 'path'
        command = path.resolve __dirname, "../node_modules/.bin/tern"
        console.log command
        args = ["--persistent", "--no-port-file","--verbose"]
        stderr = (output) -> console.error output
        stdout = (output) ->
            output = output.split(" ")
            port = output[output.length - 1]
            console.log "Tern server running on port #{port}"
            cb port
        options =
            cwd: atom.project.getRootDirectory().getPath()
        console.log(options);
        exit = (code) ->
            console.log("tern exited with code: #{code}")
        process = new BufferedProcess {command, args, options, stdout, stderr, exit}
    stop = ->
        process?.kill()
        process = null
    {start, stop}

anhhh11 avatar Dec 06 '14 04:12 anhhh11