Giter VIP home page Giter VIP logo

Comments (6)

felixrieseberg avatar felixrieseberg commented on May 17, 2024

Thank you for reporting, this is interesting! I'm wondering how we could convince your machine to find npm.

Could you do me a favor and try the following?

  1. Open fiddle
  2. Open the developer tools (Help - Show developer tools)
  3. In the console, enter the following: require('child_process').execSync('which npm').toString(). Let me know what the output is! It likely won't find npm, but we should cover that first.
  4. Then, let's see what we can and cannot find: require('child_process').execSync('echo $PATH').toString()
  5. Lastly, in a terminal, enter which npm and let me know where it lives.

Thanks!

from fiddle.

tosho avatar tosho commented on May 17, 2024
require('child_process').execSync('which npm').toString()
child_process.js:656 Uncaught Error: Command failed: which npm
    at checkExecSyncError (child_process.js:613)
    at Object.execSync (child_process.js:653)
    at Object.execSync (ELECTRON_ASAR.js:728)
    at <anonymous>:1:26

require('child_process').execSync('echo $PATH').toString()
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
"
$ which npm
/home/tosho/.nvm/versions/node/v10.8.0/bin/npm

from fiddle.

felixrieseberg avatar felixrieseberg commented on May 17, 2024

Thanks a ton! I think we can fix this.

from fiddle.

tommedema avatar tommedema commented on May 17, 2024

I'm still getting this on MacOS 10.15.6

which npm gives me /Users/tommedema/.nvm/versions/node/v12.14.1/bin/npm

from fiddle.

daslicht avatar daslicht commented on May 17, 2024

how do you fixed it please?

from fiddle.

ccniit avatar ccniit commented on May 17, 2024

My fixed steps

  1. Open fiddle
  2. Open the developer tools (Help - Toggle developer tools)
  3. Excute following code in developer-tools console to find the current shell,
    require('child_process').execSync('echo $SHELL').toString()
  4. Get npm path at you System terminal
    which npm
  5. Config npm path enviroment for the shell at step 3; eg: zsh shell is .zshrc;
  6. Restart the fiddle

from fiddle.

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.