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

nodeclipse auto-complete not working on installed packages (aws-sdk) // Tern.java? #228

Open
iamtennislover opened this issue Dec 2, 2018 · 3 comments

Comments

@iamtennislover
Copy link

I have installed aws-sdk and create a nodejs eclipse project, but i can't seem to get auto-completion on available methods in the module

here is my setup

  1. Eclipse IDE for JavaScript and Web Developers Version: Photon Release (4.8.0) Build id: 20180619-1200
  2. eclipse plugin: nodeclipse 1.0.2
  3. eclipse plugin: javascript development tools-2.1.1
  4. nodejs 0.13.0
  5. installed tern.js IDE from marketplace: https://github.com/angelozerr/tern.java/wiki/Tern-Eclipse-IDE

I noticed that it works for http standard library, but not for AWS in the following code (which builds and works fine) in the following two screen

/**
 * http://usejsdoc.org/
 */
var http = require('http');
var AWS = require('aws-sdk');
var s3 = new AWS.S3();
console.info(s3);

http auto complete working
http auto complete working

aws auto complete not working (as I can't find S3 or STS
aws auto complete not working

also i keep getting the following error in eclipse error window

```
eclipse.buildId=4.8.0.I20180611-0500
java.version=1.8.0_181
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.javascript.product
Command-line arguments:  -data file:/home/abarik/eclipse-workspace/ -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.javascript.product

tern.eclipse.ide.core
Error
Sat Dec 01 20:37:36 MST 2018
TernError: No type found at the given position.

tern.TernException: TernError: No type found at the given position.
	at tern.server.DefaultResponseHandler.getData(DefaultResponseHandler.java:45)
	at tern.server.protocol.TernResultsProcessorsFactory.makeRequestAndProcess(TernResultsProcessorsFactory.java:43)
	at tern.eclipse.ide.internal.core.resources.IDETernServerAsyncReqProcessor.run(IDETernServerAsyncReqProcessor.java:104)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)
Caused by: tern.TernException: TernError: No type found at the given position.
	at tern.server.nodejs.NodejsTernHelper.makeRequest(NodejsTernHelper.java:86)
	at tern.server.nodejs.NodejsTernServer.makeRequest(NodejsTernServer.java:163)
	at tern.server.nodejs.NodejsTernServer.request(NodejsTernServer.java:127)
	at tern.server.protocol.TernResultsProcessorsFactory.makeRequestAndProcess(TernResultsProcessorsFactory.java:42)
	... 2 more


```

ALso, i noticed that i can't seem to convert my nodeclipse project to Tern Project as shown here https://github.com/angelozerr/tern.java/wiki/Tern-Eclipse-IDE
?

@paulvi
Copy link
Member

paulvi commented Dec 3, 2018

Thanks for raising.
The stacktrace shows clear it is tern.java exception.

Copy the issue to https://github.com/angelozerr/tern.java/issues

@paulvi paulvi changed the title nodeclipse auto-complete not working on installed packages (aws-sdk) nodeclipse auto-complete not working on installed packages (aws-sdk) // Tern.java? Dec 3, 2018
@iamtennislover
Copy link
Author

Thanks but just in general, why doesn't nodeclipse do auto-complete (or is there any other way to do auto-complete other than tern.js) or its that, something tern.js does and probably thats where the error I am getting at

@paulvi
Copy link
Member

paulvi commented Dec 3, 2018

The was some very basic completion by nodeclipse.

But to do completion of some js package a knowledge or analysis of that package is required.
That is huge work, and tern.java is using tern.js for that.

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

2 participants