generator-fountain-webapp icon indicating copy to clipboard operation
generator-fountain-webapp copied to clipboard

gulp build is broken on master

Open dovydas55 opened this issue 9 years ago • 21 comments

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

dovydas55 avatar Oct 19 '16 13:10 dovydas55

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

dlegatt avatar Oct 19 '16 14:10 dlegatt

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.

edgarmaia avatar Oct 19 '16 16:10 edgarmaia

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 avatar Oct 19 '16 17:10 dlegatt

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

dlegatt avatar Oct 19 '16 17:10 dlegatt

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

edgarmaia avatar Oct 19 '16 19:10 edgarmaia

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.

dovydas55 avatar Oct 19 '16 19:10 dovydas55

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');
};

dlegatt avatar Oct 20 '16 00:10 dlegatt

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.

edgarmaia avatar Oct 20 '16 01:10 edgarmaia

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.

dlegatt avatar Oct 20 '16 03:10 dlegatt

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

Rooni avatar Oct 20 '16 10:10 Rooni

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

dlegatt avatar Oct 20 '16 13:10 dlegatt

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

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

zckrs avatar Oct 24 '16 08:10 zckrs

Only Windows affect. Linux and Mac OS works fine.

edgarmaia avatar Oct 24 '16 12:10 edgarmaia

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)

dlegatt avatar Oct 24 '16 18:10 dlegatt

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"
        }
      }
    }
  }
}

ripper2hl avatar Nov 01 '16 18:11 ripper2hl

^^^ 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?

sethreidnz avatar Nov 03 '16 17:11 sethreidnz

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!

matheusdavidson avatar Nov 03 '16 17:11 matheusdavidson

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.

edgarmaia avatar Nov 03 '16 17:11 edgarmaia

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" } } } } }

dragonvm avatar Nov 04 '16 10:11 dragonvm

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?

matheusdavidson avatar Dec 03 '16 14:12 matheusdavidson

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?

Swiip avatar Dec 31 '16 15:12 Swiip