Giter Site home page Giter Site logo

Comments (5)

noseglid avatar noseglid commented on July 28, 2024

Where do you get this error? In the build panel or as a notification (popup in Atom)?
How did you install npm?

Looking at the error message, it seems to be the other way around; npm.cmd is found, but it (which really is just a wrapper to run a node script) can't find its script (npm-cli.js).

from atom-build-npm-apm.

dannyfritz avatar dannyfritz commented on July 28, 2024

Shows up in the build panel when i try to run any npm command such as npm install. I install node with choco, which should just be a standard install in Windows. npm works great through my command prompt. npm v3.7.0

You are guessing the wrong npm path is being created in the npm.cmd file? It becomes relative to where Atom is running instead of where node is which makes me suspicious it is apm or something. Not really sure.

from atom-build-npm-apm.

noseglid avatar noseglid commented on July 28, 2024

I'm confident that build correctly finds a npm.cmd, however from there things seems flakey.
If you create an .atom-build.yml file containing only cmd: doesnotexist, then build will complain that doesnotexist doesn't exist :). It will print the PATH it's using. Make sure that there are no other npm.cmd on the path (Especially somewhere in C:\Users\Danny\Dev\...).

from atom-build-npm-apm.

dannyfritz avatar dannyfritz commented on July 28, 2024

It is finding the correct npm.cmd. But apparently on Windows, it relies on %~dp0 to find node, but %~dp0 is being set to my project's cwd which ends up not finding node.

I'll poke around further.

from atom-build-npm-apm.

dannyfritz avatar dannyfritz commented on July 28, 2024

Alright, figured it out. The package is trying to be a little too smart. At some point along the line, atom-build switched to cross-spawn-async which does not want commands to end in .cmd. Simply removing the Windows specific code around appending .cmd fixed it.

from atom-build-npm-apm.

Related Issues (9)

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.