facebook

Executing commands (ctrl+shift+P)

  1. CodeMix & Angular IDE
  2.  > 
  3. Getting Help

Tagged: ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #582729 Reply

    beat.jost
    Participant

    We have a project where the frontend is not in the ‘root’ – it’s located under src/frontend.
    When selecting a command via ‘ctrl-shift-P’ like ‘yarn start’ – I get the error message ‘Cannot read package.json’. It is looking at the wrong place… Is there a way to configure this (on project level)?

    #582838 Reply

    Brian Fernandes
    Moderator

    1) The first thing you will probably want to do is turn yarn.runInTerminal to true, so that it executes commands in the Terminal view instead of the console.

    2) Next, you could keep the package.json file in question open when executing yarn start – which should force it to work on the active file. Alternatively, you could use the yarn.packageJson preference – set it to the location of your package.json file, relative to the project root.

    To change settings, go to the Preferences > CodeMix > User Settings page.

    Please see https://github.com/gamunu/vscode-yarn#settings for more of the settings you can make for the yarn extension. I must admit that I tried the yarn.packageJson setting myself, but for some reason with my test project, it didn’t seem to work – let me know if you have better luck with this setting.

    #582911 Reply

    beat.jost
    Participant

    Thank you for your answwer!

    1) When I change ‘yarn.runInTerminal’ the target switches from console to terminal (as expected).
    Unfortunately I use rather the Terminal+

    2) However, this is the bigger issue… the package.json is not found. When I set ‘yarn.packageJson’ to the relative path (e.g. src/frontend/package.json) – this does not work. Tried also several paths… With opened package.json file it works. But this is not really an option to open it before – then I rather type to the terminal the command…

    #583092 Reply

    Brian Fernandes
    Moderator

    1) I’m glad you find Terminal+ useful. Unfortunately there isn’t a setting for this – let me file an enhancement request.

    2) You’re right – the Yarn extension seems to work if there is only a single project in the workspace, and its behavior is ambiguous if there are more than one projects. We encountered this same problem when testing the extension in VS Code as well – it works only with the first project in the workspace, ignoring the others – so I’m afraid keeping the file open or using the terminal manually is the only option until the extension itself is updated to handle multiple projects.

    #583101 Reply

    support-swapna
    Moderator

    The reported issue with output being directed to Terminal view instead of Terminal+ view has been logged in our issue tracker – see the top of this thread for a link. Feel free to vote-up this issue, as well as others you find important!
    https://www.genuitec.com/go/codemix-top-issues

    –Swapna
    Genuitec Support

    #583102 Reply

    beat.jost
    Participant

    Thanks for your support! Like CodeMix and looking forward for coming updates…

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Executing commands (ctrl+shift+P)

You must be logged in to post in the forum log in