Comments (9)
Thanks for pointing out where I should be looking.
It seems it doesn't like the simlinks my npm setup has and ends in infinite loop. I can fix that on my end.
Edit: Removing looping npm packages fixed it
from vscode-motoko.
It works most of the time. (On Mac/Intel)
However, sometimes I get these errors. (not too often)
reloading VScode or Motoko language server thru palette doesn't help.
I have to close VScode and start it again. Then it works.
from vscode-motoko.
Thanks for the bug report; I'll see if I can reproduce this on my end.
Everything seems alright for a simplified example, so would you be able to send a screenshot of your file / directory structure?
Also, does anything seem unusual in the extension log ("Output" -> "Motoko Language Server")?
The language server is able to handle multiple dfx.json
files at a time in any subdirectory, so this is supposed to work even with a different Git root.
from vscode-motoko.
Just to confirm, did this fix the original issue ("sometimes Motoko language server works and finds its files, sometimes it doesn't")?
I'll look into fixing this infinite loop condition to minimize the chance of the same situation happening in the future.
from vscode-motoko.
That is quite strange. What operating system are you using?
This might have something to do with VS Code itself rather than the extension, since the error messages indicate that the system path doesn't include npx
or mops
while the extension is being initialized.
from vscode-motoko.
MacOs 13.4
from vscode-motoko.
Thanks! I'll let you know if I find a way to reproduce this issue on my end (also on macOS 13.4).
You could try running mops sources
and npx ic-mops sources
in a terminal to see if anything unexpected happens (and then running code .
from the same terminal to inherit the system path). If this doesn't help, then it might be worth reinstalling VS Code and perhaps running the Motoko extension by itself to try and narrow down the root cause.
from vscode-motoko.
Hi @infu, are you still running into this issue? Here are a few more debugging steps that might help narrow down what's happening:
- What happens if you remove or change
defaults.build.packtool
in yourdfx.json
file? - Do you get a "command not found" message when running
which npx
andwhich mops
in the VS Code dev console?
from vscode-motoko.
same issue here
from vscode-motoko.
Related Issues (20)
- 100% CPU load with this extension HOT 10
- Do you support showing an outline? HOT 1
- performance improvements HOT 8
- extension don't see mops packages HOT 8
- multi line strings HOT 2
- extension does not recognize canister alias when project is in subdirectory HOT 5
- keyword `catch` is not highlighted HOT 1
- [Request] Please add option to disable context menu "Motoko: Deploy (20 Minutes)" HOT 2
- How to disable autoformating of comments? HOT 3
- Continuous "Reference not found from AST node:" errors HOT 5
- Motoko deploy command ERROR HOT 2
- No wigglies on https://github.dev HOT 2
- No wigglies on https://github.dev HOT 1
- management canister did file not found HOT 7
- Language server not working/Heap out of memory HOT 8
- Error while importing a canister HOT 19
- Cannot find module '@napi-rs/lzma-linux-x64-gnu' in WSL HOT 2
- Autocomplete non-functional. HOT 2
- Feature Request: Data type on variable hover HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-motoko.