添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This might be a duplicate of #733 but I'm not sure.

In rust-lang/crates.io#457 , we're trying to move to yarn. It's an ember app, and so relies on things like ember test to run tests.

The important part of the diff is here: https://github.com/rust-lang/crates.io/pull/457/files#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R10

That is, we have several npm scripts that, in my understanding, should be prefixed with yarn run . But on Travis, and possibly in other configurations, this seems to fail.

Am I Doing it Wrong, or is this a bug?

Ah sorry, the rebase made Travis go away. If you look at the comments, @carols10cents shows an error.

On Oct 11, 2016, 22:36 -0400, Yojan Shrestha [email protected] , wrote:

@Daniel15 ( https://github.com/Daniel15 )

error Command failed with exit code 127

is what I get when I try yarn start.

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub ( #780 (comment) ), or mute the thread ( https://github.com/notifications/unsubscribe-auth/AABsiqa0NJCciwUDKNGTnHNmmzx-kibJks5qzEeSgaJpZM4KUQ7o ).

Taking a look at https://yarnpkg.com/en/docs/cli/run , the usage should be yarn run blah where blah is a key in the scripts object in package.json. I don't think you want your yarn run s in the script blocks unless they need to reference other script items.

Try changing yarn run ember test in .travis.yml to yarn run test and
change "test": "yarn run ember test" in package.json to "test": "ember test" and see if that gets you closer.

FWIW, I'm experiencing the same issue as @steveklabnik in the same context (i.e. ember commands).

For example, I have scripts in my package.json like this:

  "scripts": {
    "build": "ember build",
    "start": "ember server",
    "test": "ember try:each",
    "test:dev": "ember test --filter ESLint -i",
    "tdd": "npm run test:dev -- -s",
    "lint": "ember test --filter ESLint"

npm run test will run the script located at the test key in the scripts object (i.e. ember try:each).

yarn run test does the following:

So it seems that there's a disconnect where yarn run might not be correctly accessing the .bin folder in node_modules?

FWIW, yarn run ember try:each DOES work, so it seems the issue is scoped to actually calling .bin commands from the scripts hash.

$ "node server.js" sh: node server.js: command not found error Command failed with exit code 127. info Visit http://yarnpkg.com/en/docs/cli/start for documentation about this command.
$ npm start
> [email protected] start /path/to/project
> node server.js

npm runs fine, but yarn errors out. I tried yarn run start as well and got the same results. If I remove server.js from the start script, the node repl starts up just fine.

I am experiencing similar issue in Yarn version 0.17.8.

Basically, I cannot reference yarn run inside of one of my scripts, I have to use npm run ...

This works! Referencing npm run inside of the build script

package.json
--------------
"scripts": {
    "gulp": "gulp",
    "bower": "gulp bower",
    "build": "npm run bower && npm run gulp"
--------------
$ yarn build

But this does not work, referencing yarn run inside of build script...

package.json
--------------
"scripts": {
    "gulp": "gulp",
    "bower": "gulp bower",
    "build": "yarn run bower && yarn run gulp"
--------------
$ yarn build

Output...

 ➥  yarn run build
yarn run v0.17.8
$ yarn run bower && yarn run gulp
/www/node_modules/yarn/bin/yarn.js:62
      throw err;
Error: ENOENT: no such file or directory, open '/www/node_modules/proper-lockfile/node_modules/extend/index.js'
    at Error (native)
    at Object.fs.openSync (fs.js:584:18)
    at Object.fs.readFileSync (fs.js:431:33)
    at Object.Module._extensions..js (module.js:421:20)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at Object.<anonymous> (/www/node_modules/proper-lockfile/index.js:5:14)
    at Module._compile (module.js:413:34)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I am not sure if this issue was re-introduced at some point after #809 or if this is an entirely different issue.

  • I am running macOS Sierra 10.12.1
  • All dependencies are installed locally minus Yarn (so, either npm run gulp or yarn run gulp is necessary to execute)
  • If you are aware of an existing issue already addressing this please point me in that direction. I have found several very similar issues but they don't quite address the same problem.

    Has this been resolved? Im using buble (https://buble.surge.sh) trying to output code into a .js file like so;

    yarn buble input.js > output.js
    

    I get the annoying (unnecessary) gibberish in my file.

    yarn buble v0.17.8
    $ node ./node_modules/.bin/buble demo.js
    var name = function () { return 'Sabelo'; };
    Done in 0.63s.
              

    Can anyone please help me with some information related to following.

    events.js:182
    throw er; // Unhandled 'error' event

    Error: watch /home/pavan/ALPS/web-alps/public ENOSPC
    at exports._errnoException (util.js:1022:11)
    at FSWatcher.start (fs.js:1384:19)
    at Object.fs.watch (fs.js:1410:11)
    at createFsWatchInstance (/home/pavan/ALPS/web-alps/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/home/pavan/ALPS/web-alps/node_modules/chokidar/lib/nodefs-handler.js:80:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/pavan/ALPS/web-alps/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleDir (/home/pavan/ALPS/web-alps/node_modules/chokidar/lib/nodefs-handler.js:407:19)
    at FSWatcher. (/home/pavan/ALPS/web-alps/node_modules/chokidar/lib/nodefs-handler.js:455:19)
    at FSWatcher. (/home/pavan/ALPS/web-alps/node_modules/chokidar/lib/nodefs-handler.js:460:16)
    at FSReqWrap.oncomplete (fs.js:153:5)
    error Command failed with exit code 1.

    This error sometimes it appear and sometimes it doesn`t.

    Thanks,
    Pavan.