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

Problem with gulp build

Open vaske opened this issue 8 years ago • 7 comments

Description

I generated fresh new app and filled it up with my content, when I run it with gulp serve, all works fine, no errors nor nothing else. Problem is when I try to build it even with gulp build I get error

Error Message & Stack Trace

[23:42:54] Starting 'build'...
[23:42:54] 'build' errored after 16 ms
[23:42:54] Error: File not found with singular glob: /projects/myproject/frontend/.tmp/templateCacheHtml.js
    at Glob.<anonymous> (/projects/myproject/frontend/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 (/projects/myproject/frontend/node_modules/glob-stream/node_modules/glob/glob.js:172:8)
    at done (/projects/myproject/frontend/node_modules/glob-stream/node_modules/glob/glob.js:159:12)
    at Glob._processSimple2 (/projects/myproject/frontend/node_modules/glob-stream/node_modules/glob/glob.js:652:12)
    at /projects/myproject/frontend/node_modules/glob-stream/node_modules/glob/glob.js:640:10
    at Glob._stat2 (/projects/myproject/frontend/node_modules/glob-stream/node_modules/glob/glob.js:736:12)
    at lstatcb_ (/projects/myproject/frontend/node_modules/glob-stream/node_modules/glob/glob.js:728:12)
    at RES (/projects/myproject/frontend/node_modules/inflight/inflight.js:23:14)
    at f (/projects/myproject/frontend/node_modules/once/once.js:25:25)
    at FSReqWrap.oncomplete (fs.js:82:15)

when I add file manually get error like


[23:49:22] 'build' errored after 64 ms
[23:49:22] Error: Error: File not found with singular glob: /projects/myproject/bower_components/jquery/dist/jquery.js
    at DestroyableTransform.<anonymous> (/projects/myproject/frontend/node_modules/gulp-useref/index.js:65:28)
    at emitOne (events.js:82:20)
    at DestroyableTransform.emit (events.js:169:7)
    at emitOne (events.js:82:20)
    at Through2.emit (events.js:169:7)
    at OrderedStreams.<anonymous> (/projects/myproject/frontend/node_modules/glob-stream/index.js:140:20)
    at emitOne (events.js:77:13)
    at OrderedStreams.emit (events.js:169:7)
    at emitOne (events.js:77:13)
    at DestroyableTransform.emit (events.js:169:7)
    at Glob.<anonymous> (/projects/myproject/frontend/node_modules/glob-stream/index.js:40:16)
    at Glob.g (events.js:260:16)
    at emitOne (events.js:77:13)
    at Glob.emit (events.js:169:7)
    at Glob._finish (/projects/myproject/frontend/node_modules/glob-stream/node_modules/glob/glob.js:172:8)
    at done (/projects/myproject/frontend/node_modules/glob-stream/node_modules/glob/glob.js:159:12)


I did not change anything but this path is wrongly build /projects/myproject/bower_components/jquery/dist/jquery.js

it miss my parent folder __frontend__ not sure where I have to add that folder or set to include proper path in build.

Config

Copy the content from .yo-rc.json:

{}
it's empty

Relevant Links

it's still not publicly visible

Environment

Tell us which operating system you are using, as well as which versions of Node.js, npm, and yo. Run the following to get it quickly:

Node.js v5.3.0
darwin 15.6.0
yo 1.6.0
npm 3.10.6

vaske avatar Oct 07 '16 21:10 vaske

I've just ran into the same error. I don't know if you already solved it, but I'll answer in case of.

In fact, if you look at the task who will generate this templateCacheHtml.js (./gulp_tasks/partials.js), you will see that it's look for html file only in src/app/**/*.html in order to create the cache file. So if you have removed the default app folder it will find nothing and will not generate the template cache file.

For my needs i've changed the source of html file to gulp.src(conf.path.src('**/*.html')) which will take all the .html files in the src (and its subfolders) folder.

zedissime avatar Oct 18 '16 14:10 zedissime

@zedissime I solved this problem was wrong path, but other one still remains, and I solved it with copy/paste bower_components into parent directory, but that is not correct behaviour, any idea how to tell gulp to look to correct bower_components folder?

vaske avatar Oct 27 '16 21:10 vaske

i have the same issue, did you solve it @vaske ?

matheusdavidson avatar Dec 03 '16 04:12 matheusdavidson

@matheusdavidson sorry for late response. No I did not on some proficient way than created a symbolic link to bower_components from parent folder.

vaske avatar Dec 14 '16 10:12 vaske

Hey guys, gulp build and npm run build for using the following configuration doesn't work. It doesn't throw any errors, it just removes the root/app element from the dom and nothing happens...

{ "generator-fountain-vue": { "version": "1.0.0", "props": { "framework": "vue", "modules": "webpack", "js": "babel", "ci": "", "css": "scss", "resolved": "C:\\Users\\liliana.iturribarria\\AppData\\Roaming\\npm\\node_modules\\generator-fountain-webapp\\node_modules\\generator-fountain-vue\\generators\\app\\index.js", "namespace": "fountain-vue:app", "_": [], "sample": "todoMVC", "router": "router" } } }

EM-LilianaIturribarria avatar Mar 06 '17 20:03 EM-LilianaIturribarria

@EM-LilianaIturribarria I meet the same isuss, how to deal with this isuss

luyaohua2016 avatar Apr 18 '17 09:04 luyaohua2016

Hu @luyaohua2016 It only works if you use a vhost. Accessing localhost/name-of-the-repo didnt work for me.

EM-LilianaIturribarria avatar Apr 18 '17 15:04 EM-LilianaIturribarria