Git Product home page Git Product logo

Comments (9)

infu avatar infu commented on July 22, 2024 1

Thanks for pointing out where I should be looking.
image
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.

infu avatar infu commented on July 22, 2024 1

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.
image

from vscode-motoko.

rvanasa avatar rvanasa commented on July 22, 2024

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.

rvanasa avatar rvanasa commented on July 22, 2024

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.

rvanasa avatar rvanasa commented on July 22, 2024

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.

infu avatar infu commented on July 22, 2024

MacOs 13.4

from vscode-motoko.

rvanasa avatar rvanasa commented on July 22, 2024

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.

rvanasa avatar rvanasa commented on July 22, 2024

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 your dfx.json file?
  • Do you get a "command not found" message when running which npx and which mops in the VS Code dev console?

from vscode-motoko.

ottodevs avatar ottodevs commented on July 22, 2024

same issue here

from vscode-motoko.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.