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

Salsa not working with require('path') #2850

Closed
SteveALee opened this issue Feb 9, 2016 · 8 comments
Closed

Salsa not working with require('path') #2850

SteveALee opened this issue Feb 9, 2016 · 8 comments
Assignees

Comments

@SteveALee
Copy link

I enabled Salsa and tried the most basic thing in some node code

'use strict';
const Path = require('path');
var c = Path.

When I type the . after Path none of the path functions (eg normalize) are available. Same with any other node builtin module. They are in the typings node.d.ts which I installed as previously required before I enabled Salsa.

@alexdima
Copy link
Member

This worked for me when I tried Salsa, @egamma -- maybe a configuration problem?

@SteveALee
Copy link
Author

OK so I tried in a new empty project folder with almost empty code user settings.json.

1st I tried the old intellisense with Salsa env var renamed to disable it I find even the typescript based intellisense is not working.

What am I not understanding?

test,js

var p = require('path');
var c = p.
console.

jsconfig.json

{
    "compilerOptions": {
        "target": "ES6",
        "module": "commonjs"
    }
}

I get autocomplete suggestions for console once I have a package.json, presumably as code can then infer the correct context. However, I get no suggestions for p?

I have node 4.2.6 installed on Windows 10
What else effects the intellisense?

@SteveALee
Copy link
Author

I'm assuming I don't need to install any typings as node is directly supported. It should just work out of the box.

@egamma
Copy link
Member

egamma commented Feb 10, 2016

Sorry, but you still need to intstall the node.d.ts file, this hasn't changed between pre-salsa and Salsa JS support.

Closing this issue - automatic fetching of typings is high on the backlog of Salsa.

@egamma egamma closed this as completed Feb 10, 2016
@SteveALee
Copy link
Author

OK. I did make abortive attempt but typings install node failed. Will try again.

Thanks for quick response

@SteveALee
Copy link
Author

So need to use the mysterious typings --ambient flag but then it hangs. Back to tsd which works fine

@SteveALee
Copy link
Author

You should probably add this to the javascript docs to make it crystal clear is needed for node.

@egamma
Copy link
Member

egamma commented Feb 10, 2016

fyi @gregvanl

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants