Skip to content
This repository has been archived by the owner on Feb 27, 2019. It is now read-only.

gulp build is broken on master #150

Open
dovydas55 opened this issue Oct 19, 2016 · 21 comments
Open

gulp build is broken on master #150

dovydas55 opened this issue Oct 19, 2016 · 21 comments

Comments

@dovydas55
Copy link

yoman configuration:

  • angular 1.5
  • UI router
  • bower
  • hello world landing page

running gulp build crashes with following error:
[13:16:29] Error: File not found with singular glob: dir.tmp\index.html
at Glob. (C:\Users\ds\Desktop\dir\node_modules\glob-stream\index.js:41:11)
at Glob.g (events.js:260:16)
at emitOne (events.js:77:13)
at Glob.emit (events.js:169:7)
at Glob._finish (C:\Users\ds\Desktop\dir\node_modules\glob-stream\node_modules\glob\glob.js:172:8)
at done (C:\Users\ds\Desktop\dir\node_modules\glob-stream\node_modules\glob\glob.js:159:12)
at Glob._processSimple2 (C:\Users\ds\Desktop\dir\node_modules\glob-stream\node_modules\glob\glob.js:652:12)
at C:\Users\ds\Desktop\dir\node_modules\glob-stream\node_modules\glob\glob.js:640:10
at Glob.stat2 (C:\Users\ds\Desktop\dir\node_modules\glob-stream\node_modules\glob\glob.js:736:12)
at lstatcb
(C:\Users\ds\Desktop\dir\node_modules\glob-stream\node_modules\glob\glob.js:728:12)
at RES (C:\Users\ds\Desktop\dir\node_modules\inflight\inflight.js:31:16)
at f (C:\Users\ds\Desktop\dir\node_modules\once\once.js:25:25)
at FSReqWrap.oncomplete (fs.js:82:15)
[13:16:29] 'build' errored after 1.15 s

Please offer a solution as master is unstable

@dlegatt
Copy link

dlegatt commented Oct 19, 2016

I am seeing the same issue. The entire src directory is being moved to .tmp rather than the contents.

@edgarmaia
Copy link

After the update of glob-parent this issue happens. To temporarily fix try change the version of the glob-parent to 3.0.0 in node_modules > glob-stream > node_modules > glob-parent.

@dlegatt
Copy link

dlegatt commented Oct 19, 2016

I'm not sure I follow what you're saying. Under node_modules>glob-stream>node_modules>glob-parent, I have version 3.0.0

@dlegatt
Copy link

dlegatt commented Oct 19, 2016

This is very strange. It works on my Mac, but not on Windows. Both are running Node v4.6.1

@edgarmaia
Copy link

edgarmaia commented Oct 19, 2016

In glob-parent folder your index.js is this?

@dovydas55
Copy link
Author

for temporary solution i ran
npm shrinkwrap

and changed glob parent for glob stream to be in version 3.0.0. Then just run npn install again. Should work fine.

@dlegatt
Copy link

dlegatt commented Oct 20, 2016

My node_modules/glob-stream/node_modules/glob-parent/index.js looks like this

'use strict';

var path = require('path');
var isglob = require('is-glob');
var pathDirname = require('path-dirname');

module.exports = function globParent(str) {
        str += 'a'; // preserves full path in case of trailing path separator
        do {str = pathDirname.posix(str)} while (isglob(str));
        return str.replace(/\\([\*\?\|\[\]\(\)\{\}])/g, '$1');
};

@edgarmaia
Copy link

edgarmaia commented Oct 20, 2016

This code is latest version (3.0.1). Try changing your index.js with (version 3.0.0):

'use stric';

var path = require('path');
var isglob = require('is-glob');

module.exports = function globParent(str) {
    str += 'a'; // preserves full path in case of trailing path separator
    do {str = path.dirname(str)} while (isglob(str));
    return str;
};

Or try to run commands @dovydas55 said.

@dlegatt
Copy link

dlegatt commented Oct 20, 2016

I haven't used npm shrinkwrap before, so I wasnt sure of the full extent of what he did. I'm still learning NPM and front end dev. I'll try your code in the office tomorrow.

@Rooni
Copy link

Rooni commented Oct 20, 2016

Confirming changing to the v3.0.0 index.js for glob-parent works for me. Thanks!

@dlegatt
Copy link

dlegatt commented Oct 20, 2016

I can also confirm that editing the index.js for glob-parent worked.

@zckrs
Copy link
Member

zckrs commented Oct 24, 2016

I try to reproduce your error on master. Everything works. :-/

Can you provide more information like a paste of your .yo-rc.json ?

@edgarmaia
Copy link

Only Windows affect. Linux and Mac OS works fine.

@dlegatt
Copy link

dlegatt commented Oct 24, 2016

I can confirm this is true between my windows 8.1 laptop that i use for work and my personal MBP running OS X Yosemite (10.11)

@ripper2hl
Copy link

Same error i use npm shrinkwrap but doesnt work automatically, this my npm-shrinkwrap.json

{
  "name": "proyect",
  "dependencies": {
    "path-dirname": {
      "version": "1.0.2",
      "from": "path-dirname@>=1.0.0 <2.0.0",
      "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz"
    },
    "glob-stream" :{
      "version": "5.3.5",
      "dependencies" : {
        "glob-parent" : {
          "version" : "3.0.0"
        }
      }
    }
  }
}

@sethreidnz
Copy link

sethreidnz commented Nov 3, 2016

^^^ Make sure you delete your node_modules and try again. That's what I needed to do.

Any ideas on why this is happening though? Like I get that its an update in glob-parent but do we know why this causes this issue and how to resolve it long term?

@matheusdavidson
Copy link

use @dovydas55 solution with @ripper2hl comments.
Do not change index.js directly as @edgarmaia said, this i a bad idea because you'll have to change this everytime you run npm install!

@edgarmaia
Copy link

edgarmaia commented Nov 3, 2016

Yes, run npm shrinkwrap and change version of the glob-parent to 3.0.0 in glob-stream (npm-shrinkwrap.json file). Run npm install again.

@dragonvm
Copy link

dragonvm commented Nov 4, 2016

This problem made me crazy! Finally fixed looking at @ripper2hl solution.

Running npm shrinkwrap will create a file without any dependency, then you should change to this code (or add this dependency version to your current shrinkwrap file)

{ "dependencies": { "glob-stream" :{ "version": "5.3.5", "dependencies" : { "glob-parent" : { "version" : "3.0.0" } } } } }

@matheusdavidson
Copy link

Hey guys, the glob-stream issue (3.0.1 to 3.0.0) fix my problem for npm run serve, .tmp folder is ok(without extra src folder), but when i run npm run serve:dist or npm run build i get the same error @dovydas55 stated in the first comment, but instead of complaining about index.html, glob complains about templateCache.js, anyone with the same issue?

@Swiip
Copy link
Member

Swiip commented Dec 31, 2016

Hi, Finally try this on windows, and... All worked fine...

I checked glob-stream, I got 5.3.5 depending on glob-parent 3.1.0.

Perhaps, glob-parent 3.1.0 update fixed the problem, can you all check that?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants