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

Can Not Activate rust-analyzer: Bootstrap Error #5257

Closed
aurexav opened this issue Jul 8, 2020 · 7 comments
Closed

Can Not Activate rust-analyzer: Bootstrap Error #5257

aurexav opened this issue Jul 8, 2020 · 7 comments

Comments

@aurexav
Copy link

aurexav commented Jul 8, 2020

ERROR [7/8/2020, 10:37:58 AM]: [TypeError: node_fetch_1.default is not a function
	at Object.fetchRelease (/Users/xavier/.vscode-insiders/extensions/matklad.rust-analyzer-0.3.234-nightly/out/src/main.js:15902:48)
	at bootstrapExtension (/Users/xavier/.vscode-insiders/extensions/matklad.rust-analyzer-0.3.234-nightly/out/src/main.js:16118:31)
	at bootstrap (/Users/xavier/.vscode-insiders/extensions/matklad.rust-analyzer-0.3.234-nightly/out/src/main.js:16094:11)
	at async tryActivate (/Users/xavier/.vscode-insiders/extensions/matklad.rust-analyzer-0.3.234-nightly/out/src/main.js:16022:24)
	at async activate (/Users/xavier/.vscode-insiders/extensions/matklad.rust-analyzer-0.3.234-nightly/out/src/main.js:15996:5)
	at async Promise.all (index 0)]
ERROR [7/8/2020, 10:37:58 AM]: Bootstrap error [TypeError: node_fetch_1.default is not a function
	at Object.fetchRelease (/Users/xavier/.vscode-insiders/extensions/matklad.rust-analyzer-0.3.234-nightly/out/src/main.js:15902:48)
	at getServer (/Users/xavier/.vscode-insiders/extensions/matklad.rust-analyzer-0.3.234-nightly/out/src/main.js:16235:31)
	at async bootstrapServer (/Users/xavier/.vscode-insiders/extensions/matklad.rust-analyzer-0.3.234-nightly/out/src/main.js:16145:18)
	at async bootstrap (/Users/xavier/.vscode-insiders/extensions/matklad.rust-analyzer-0.3.234-nightly/out/src/main.js:16095:18)
	at async tryActivate (/Users/xavier/.vscode-insiders/extensions/matklad.rust-analyzer-0.3.234-nightly/out/src/main.js:16022:24)
	at async activate (/Users/xavier/.vscode-insiders/extensions/matklad.rust-analyzer-0.3.234-nightly/out/src/main.js:15996:5)
	at async Promise.all (index 0)]
@aurexav
Copy link
Author

aurexav commented Jul 8, 2020

Fixed, after reinstall.

@lnicola
Copy link
Member

lnicola commented Jul 8, 2020

@Veetaha could this be related to the TS import config changes?

@aurexav aurexav changed the title Can Not Activate rust-analyzer: Bootstrao Error Can Not Activate rust-analyzer: Bootstrap Error Jul 8, 2020
@Veetaha
Copy link
Contributor

Veetaha commented Jul 8, 2020

@lnicola this is very strange, I do have the same problem when installing the new nightly.
But according to what I see in REPL, everything should work fine.

~/dev/rust-analyzer/editors/code (feat/gzip-binaries) $ node
Welcome to Node.js v14.4.0.
Type ".help" for more information.
> var fetch = require("node-fetch")
undefined
> fetch.default
<ref *1> [Function: fetch] {
  isRedirect: [Function (anonymous)],
  Promise: [Function: Promise],
  default: [Circular *1],
  Headers: [Function: Headers],
  Request: [Function: Request],
  Response: [Function: Response],
  FetchError: [Function: FetchError]
}
> fetch.default()
Promise {
  <rejected> TypeError: Only absolute URLs are supported

Maybe there is some problem with rollup?

@lnicola
Copy link
Member

lnicola commented Jul 8, 2020

But why would reinstalling the extension fix it?

@Veetaha
Copy link
Contributor

Veetaha commented Jul 8, 2020

@AurevoirXavier have you switched to stable channel when reinstalling?

@Veetaha
Copy link
Contributor

Veetaha commented Jul 8, 2020

Yes, this is the problem with rollup, for some reason, it messes all up, god...

bors bot added a commit that referenced this issue Jul 8, 2020
5262: Workaround rollup messing up default imports r=matklad a=Veetaha

Tackles #5257 (comment)
Related: rollup/plugins#491

Co-authored-by: Veetaha <[email protected]>
@aurexav
Copy link
Author

aurexav commented Jul 9, 2020

@AurevoirXavier have you switched to stable channel when reinstalling?

No, always nightly.

matklad pushed a commit to matklad/vscode-rust that referenced this issue Jul 13, 2020
5262: Workaround rollup messing up default imports r=matklad a=Veetaha

Tackles rust-lang/rust-analyzer#5257 (comment)
Related: rollup/plugins#491

Co-authored-by: Veetaha <[email protected]>
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