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

Server not running in <script> tags

Open ivyrze opened this issue 7 years ago • 9 comments

I'm trying to write vanilla JS and jQuery code inside of

atom-ternjs-client.js [sm]:161 TypeError: this.restart is not a function(…) (anonymous function) @ atom-ternjs-client.js [sm]:161

If I click into Packages > Atom Ternjs > Restart Server everything works for the duration that the file is open. I also found that if I edit a pure .js file, everything works as expected.

I'm using the latest version of Atom and tern and I also have tern-browser-extension installed through npm.

ivyrze avatar May 16 '17 00:05 ivyrze

Update: I've found that if I have a .js file open in another tab, then things will work as expected in the .php and .html files.

ivyrze avatar May 26 '17 11:05 ivyrze

You mean

exse2 avatar Aug 18 '17 09:08 exse2

@vqdave just to confirm you have jQuery selected?

screen shot 2017-10-19 at 11 55 21 pm

jdavis-software avatar Oct 20 '17 06:10 jdavis-software

@jdavis-software Yes, jQuery is selected in the .tern-project.

ivyrze avatar Oct 20 '17 10:10 ivyrze

Working fine for me:

atom-ternjs

Post a .gif re-creating the issue so we can narrow it down for you.

Here is a good screen recording app GIPHY that formats to .gif

jdavis-software avatar Oct 20 '17 16:10 jdavis-software

Video was too long for a .gif, take a look at this.. video.zip

ivyrze avatar Oct 20 '17 22:10 ivyrze

@vqdave kk your conf file looks good, and your right I was able to duplicate this bug, if I close out all files so only .php not .html or .js and it stopped working.

jdavis-software avatar Oct 23 '17 19:10 jdavis-software

@vqdave Checkout #299 basically the server won't run unless there is a .js file open... until this bug is fixed I would just open a blank .js file. Good find though, I'll keep subscribed to wait for update.

jdavis-software avatar Oct 23 '17 19:10 jdavis-software

the package isn't designed to work in html or php files. maybe in the future :)

tststs avatar Mar 03 '19 17:03 tststs