Giter Club home page Giter Club logo

npm-run's Issues

bug: options is not optional

When running npmRun.exec(cmd, callback) I got a TypeError: Cannot read property 'env' of undefined (at augmentOptionsSync - index.js:73:34).

Remove spawn-sync dep

Is it possible to remove that dep in favor of using the built in one?

I understand backwards compat issues, BUT let me tell you my story:

I am using the linter happiness (a fork of standard). I added it to the package.json's of my company modules, about 100 of them. We are also using linklocal for development and a recursive link via bulk. Turns out that the npm install in all these directories takes like an hour. Here is the dependency tree that is leading here:

node_modules/happiness/node_modules/happiness-format/node_modules/esformatter/node_modules/npm-run/node_modules/spawn-sync

spawn-sync is a c extension, so gets compiled for every npm install that is run. I didnt spend the time to figure out how many times it is run, but I started it at like 9am and now it is 12 and it is still running :)

I had some time, so figured I would open an issue here.....

Dashed parameters are not passed

When I install bower locally and try to get it's version with npm-run bower --version I get the version of npm-run, not of bower. Same with grunt. I suspect that the --params are not passed to the binary correctly.

ENOENT error on Windows

D:\Dev\webextension-test>npm-run --version
5.0.1

D:\Dev\webextension-test>npm-run web-ext --version
Error: spawn web-ext ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:201:19)
    at onErrorNT (internal/child_process.js:379:16)
    at process._tickCallback (internal/process/next_tick.js:114:19)
    at Function.Module.runMain (module.js:705:11)
    at startup (bootstrap_node.js:193:16)
    at bootstrap_node.js:660:3

D:\Dev\webextension-test>npm-run where web-ext
D:\Dev\webextension-test\node_modules\.bin\web-ext
D:\Dev\webextension-test\node_modules\.bin\web-ext.cmd
C:\Users\Owner\AppData\Roaming\npm\web-ext
C:\Users\Owner\AppData\Roaming\npm\web-ext.cmd

It works fine with v4.x.

Local eslint doesn't work

This happens because eslint doesnt get installed in node_modules/bin, but rather in node_modules/eslint/bin. (but if I add a script in package.json, npm will find it).

Is this in the scope of the project? Would you accept a PR?

Cannot find module 'cross-spawn'

npm-run breaks due to "cross-spawn" not being installed. This dependency got removed in the last commit.

npm-run app-config build -e staging-f ./src/config.default.js
module.js:545
    throw err;
    ^
Error: Cannot find module 'cross-spawn'
    at Function.Module._resolveFilename (module.js:543:15)
    at Function.Module._load (module.js:470:25)
    at Module.require (module.js:593:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/npm-run/index.js:5:13)
    at Module._compile (module.js:649:30)
    at Object.Module._extensions..js (module.js:660:10)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:501:12)
    at Function.Module._load (module.js:493:3)

Doesn't work on Windows 10 ?

Hi, it seems npm-run doesn't work on my windows. Basically it will return a not found: module-xyz for every module I tried. But on bash on ubuntu for windows, same machine, it works (and in both cases, nothing is globally installed). Is it as intended ? Thank you

Run from a sub-directory

Is it possible to run a package from a sub-directory or a folder different from the root of the project? Now I get:

not found: PACKAGE_NAME

Thanks,
Marco.

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.