Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Pymakr in VSCode can't find NodeJS (but it is installed)

    Scheduled Pinned Locked Moved Issues & Bugs
    2 Posts 1 Posters 71 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      danielk
      last edited by danielk

      Installing Pymakr into VSCode on my Mac, it repeatedly reports:

      "NodeJS not detected on this machine, which is required for Pymakr to work."

      However, nodejs LTS was installed from https://nodejs.org/ using the Mac installer with defaults and is located in /usr/local/bin.

      VSCode has been installed for months (and used extensively for Python dev), and updated monthly with new releases. I can't find anywhere to set a PATH inside VSCode, but when I open a terminal inside VSCode, it shows /usr/local/bin in the PATH. MacOS has also been restarted, with no change in behaviour.

      Any ideas how to resolve this issue? Software and log details below.

      Thanks.

      Software versions:
      MacOS: 10.14.6
      VSCode: 1.44.2

      • Commit: ff915844119ce9485abfe8aa9076ec76b5300ddd
      • Date: 2020-04-16T17:07:18.473Z
      • Electron: 7.1.11
      • Chrome: 78.0.3904.130
      • Node.js: 12.8.1
      • V8: 7.8.279.23-electron.0
      • OS: Darwin x64 18.7.0

      Pymakr: 1.1.6
      NodeJS (installed outside VSCode): v12.16.3

      VSCode console says:

      console.ts:137 [Extension Host] Serialport included without issues
      console.ts:137 [Extension Host] [warning] SettingsWrapper | Error processing Config file:/Users/user/Library/Application Support/Code/User/pymakr.json
      console.ts:137 [Extension Host] [warning] SettingsWrapper | Error processing Config file:null/pymakr.conf
      console.ts:137 [Extension Host] [warning] SettingsWrapper | Error opening config file 
      console.ts:137 [Extension Host] [warning] SettingsWrapper | Error: ENOENT: no such file or directory, open '/Users/user/Library/Application Support/Code/User/pymakr.json'
      console.ts:137 [Extension Host] [warning] SettingsWrapper | Error opening config file 
      console.ts:137 [Extension Host] [warning] SettingsWrapper | Error: ENOENT: no such file or directory, open 'null/pymakr.conf'
      notificationsAlerts.ts:40 NodeJS not detected on this machine, which is required for Pymakr to work. See the Pymakr readme for dependancies.
      onDidChangeNotification @ notificationsAlerts.ts:40
      
      D 1 Reply Last reply Reply Quote 0
      • D Offline
        danielk @danielk
        last edited by

        I've determined so far (by a small hack to pycom.pymakr/pymakr.js after installation) that the PATH that VSCode receives does not include /usr/local/bin, where the "node" executable is installed. (VSCode is being launched from Finder.)

        So the problem reduces to how to get that PATH into VSCode, which appears remarkably difficult in more recent versions of MacOS, and none of the recipes I've found work reliably without manual intervention. Moving node into /usr/bin is not possible due to MacOS System Integrity Protection.

        I can at least use pymakr now, but the extension or the installation instructions need to be updated to provide a workaround for this issue.

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • 1 / 1
        • First post
          Last post

        Pycom on Twitter

        Pycom