Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

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

Gulp serve:dist or gulp build doens't work #1982

Closed
1 task done
sonic182 opened this issue Jun 17, 2016 · 14 comments · Fixed by #2003
Closed
1 task done

Gulp serve:dist or gulp build doens't work #1982

sonic182 opened this issue Jun 17, 2016 · 14 comments · Fixed by #2003
Assignees
Labels

Comments

@sonic182
Copy link

sonic182 commented Jun 17, 2016

error trace ->
[12:33:06] Finished 'copy:server' after 167 ms
[12:33:06] Finished 'copy:extras' after 173 ms
fs.js:839
return binding.lstat(pathModule._makeLong(path));
^

Error: ENOENT: no such file or directory, lstat '/home/sonic182/sandbox/samples/sequel/.tmp/templates.js'
at Error (native)
at Object.fs.lstatSync (fs.js:839:18)

  • I understand that GitHub issues are not for tech support, but for questions specific to this generator, bug reports, and feature requests.
Item Version
generator-angular-fullstack 3.7.5
Node 4.3.0
npm 3.9.5
Operating System Ubuntu 14.04 (trusty)
Item Answer
Transpiler Babel
Markup Jade
CSS SCSS
Router ui-router
Build Tool Gulp
Client Tests Mocha
DB SQL
Auth Y
@sonic182
Copy link
Author

I tried with the latest version of node, still the same

@Koslun
Copy link
Member

Koslun commented Jun 17, 2016

@sonic182 do you mean 6.2.1 or 4.4.5? If with 6.2.1, did you also re-install all the npm dependencies? Also what database flavor and version are you using? Not sure that either are relevant to the issue but not sure that it isn't either.

Can you also confirm that this issue happens for a completely fresh version of the generator?

At first glance I can only tell that it seems related to some combination of the SQL option. Which would also be my best guess as to why it wouldn't have been reported earlier either, at least given that my assumption that the SQL option is less popular holds true and that this is in fact a bug with the generator.

@sonic182
Copy link
Author

Sorry, I tried TOO with the last version of node (and with 4.3.0)

@sonic182
Copy link
Author

sonic182 commented Jun 17, 2016

Close this, those files were missing because I haven't sass (In docker containers was the problem and in my machine I updated ruby)

@sonic182 sonic182 reopened this Jun 17, 2016
@sonic182
Copy link
Author

The problem persist, sorry for close and open

@sonic182
Copy link
Author

It happens creating a new proyect and doing gulp dist:serve inmediatly, with mongoose, sequel, nodejs 6, 4, OSX... I've been testing it all day :/ (gulp serve works, but not dist :/)

@Awk34
Copy link
Member

Awk34 commented Jun 17, 2016

FYI templates.js is created by gulp-angular-templatecache

@sonic182
Copy link
Author

sonic182 commented Jun 17, 2016

I did this repo https://github.com/sonic182/sample, It's a generated app with the configs that I want to use, with a Dockerfile and a docker-compose (justo to containerize the app and mongodb) Pretty simple, It doesn't work with node:4, node:6 causes the error adove. (I tried with an Digitalocean vps of docker 14.04 and nothing..)

@MichaelMarkieta
Copy link
Contributor

MichaelMarkieta commented Jun 18, 2016

Confirm that this is an issue. This problem is present straight away after generating the source. I am also experiencing this on:

+-- bower@1.7.9
+-- generator-angular-fullstack@3.7.5
+-- grunt-cli@1.2.0
+-- gulp-cli@1.2.1
+-- npm@3.8.6
`-- yo@1.8.4

On:

Item Version
generator-angular-fullstack 3.7.5
Node 6.2.2
npm 3.9.6
System Mac 10.10.4
Item Answer
Transpiler Babel
Markup HTML
CSS CSS
Router ui-router
Build Tool Gulp
Client Tests Mocha
DB PostgreSQL
Auth Y

Here is one of my stack traces:

MichaelMarkieta:examplesite michaelmarkieta$ gulp serve:dist
[13:42:03] Requiring external module babel-register
(node:51131) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
[13:42:05] Using gulpfile ~/Sites/example/examplesite/gulpfile.babel.js
[13:42:05] Starting 'serve:dist'...
[13:42:05] Starting 'build'...
[13:42:05] Starting 'clean:dist'...
[13:42:05] Starting 'clean:tmp'...
[13:42:05] Finished 'clean:tmp' after 43 ms
[13:42:05] Finished 'clean:dist' after 48 ms
[13:42:05] Starting 'inject'...
[13:42:05] Starting 'inject:js'...
[13:42:05] Starting 'inject:css'...
[13:42:05] gulp-inject 5 files into index.html.
[13:42:05] Finished 'inject:css' after 77 ms
[13:42:05] gulp-inject 22 files into index.html.
[13:42:05] Finished 'inject:js' after 112 ms
[13:42:05] Finished 'inject' after 112 ms
[13:42:05] Starting 'wiredep:client'...
[13:42:05] Finished 'wiredep:client' after 22 ms
[13:42:05] Starting 'transpile:client'...
[13:42:05] Starting 'transpile:server'...
[13:42:06] Finished 'transpile:client' after 765 ms
[13:42:06] Finished 'transpile:server' after 765 ms
[13:42:06] Starting 'build:images'...
[13:42:06] Starting 'copy:extras'...
[13:42:06] Starting 'copy:fonts'...
[13:42:06] Starting 'copy:assets'...
[13:42:06] Starting 'copy:server'...
[13:42:06] Starting 'styles'...
[13:42:06] Starting 'html'...
[13:42:06] Starting 'constant'...
[13:42:06] Finished 'constant' after 55 ms
[13:42:06] Finished 'copy:assets' after 148 ms
[13:42:06] Finished 'copy:server' after 189 ms
[13:42:06] Finished 'copy:extras' after 193 ms
fs.js:976
  return binding.lstat(pathModule._makeLong(path));
                 ^

Error: ENOENT: no such file or directory, lstat '/Users/michaelmarkieta/Sites/example/examplesite/client/templates.js'
  at Error (native)
  at Object.fs.lstatSync (fs.js:976:18)
  at DestroyableTransform.TransformStream [as _transform] (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-header/index.js:38:12)
  at DestroyableTransform.Transform._read (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:159:10)
  at DestroyableTransform.Transform._write (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:147:83)
  at doWrite (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:313:64)
  at writeOrBuffer (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:302:5)
  at DestroyableTransform.Writable.write (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:241:11)
  at write (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:623:24)
  at flow (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:632:7)
  at DestroyableTransform.pipeOnReadable (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:664:5)
  at emitNone (events.js:86:13)
  at DestroyableTransform.emit (events.js:185:7)
  at emitReadable_ (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:448:10)
  at emitReadable (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:444:5)
  at readableAddChunk (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:187:9)
  at DestroyableTransform.Readable.push (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:149:10)
  at DestroyableTransform.Transform.push (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_transform.js:145:32)
  at DestroyableTransform.endStream [as _flush] (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/index.js:98:10)
  at DestroyableTransform.<anonymous> (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_transform.js:135:12)
  at DestroyableTransform.g (events.js:286:16)
  at emitNone (events.js:86:13)
  at DestroyableTransform.emit (events.js:185:7)
  at finishMaybe (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_writable.js:371:12)
  at endWritable (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_writable.js:378:3)
  at DestroyableTransform.Writable.end (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_writable.js:356:5)
  at Stream.onend (stream.js:59:10)
  at emitNone (events.js:91:20)
  at Stream.emit (events.js:185:7)
  at end (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/map-stream/index.js:116:39)
  at Stream.stream.end (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/map-stream/index.js:122:5)
  at Stream.method [as end] (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/duplexer/index.js:47:39)
  at DestroyableTransform.onend (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js:523:10)
  at DestroyableTransform.g (events.js:286:16)
  at emitNone (events.js:91:20)
  at DestroyableTransform.emit (events.js:185:7)
  at /Users/michaelmarkieta/Sites/example/examplesite/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js:965:16
  at _combinedTickCallback (internal/process/next_tick.js:67:7)
  at process._tickDomainCallback (internal/process/next_tick.js:122:9)

gulp serve works without issues.

Tried switching my node version (via nvm) and rebuilding dependencies on each switch, and the problem persists on all 4@latest, 5@latest and 6@latest versions.

@MichaelMarkieta
Copy link
Contributor

MichaelMarkieta commented Jun 18, 2016

Attempting this with a freshly generated app, selecting all the defaults by hitting enter on every question. Looks exactly the same, which seems to indicate its not due to sequelize (last comment was on sequelize with postgresql).

Item Version
generator-angular-fullstack 3.7.5
Node 6.2.2
npm 3.9.6
System Mac 10.10.4
Item Answer
Transpiler Babel
Markup HTML
CSS SCSS
Router ui-router
Build Tool Gulp
Client Tests Mocha
DB MongoDB
Auth Y
Socket.io Y
MichaelMarkieta:examplesite michaelmarkieta$ gulp serve:dist
[13:54:04] Requiring external module babel-register
(node:54288) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
[13:54:06] Using gulpfile ~/Sites/example/examplesite/gulpfile.babel.js
[13:54:06] Starting 'serve:dist'...
[13:54:06] Starting 'build'...
[13:54:06] Starting 'clean:dist'...
[13:54:06] Starting 'clean:tmp'...
[13:54:06] Finished 'clean:dist' after 5.99 ms
[13:54:06] Finished 'clean:tmp' after 3.55 ms
[13:54:06] Starting 'inject'...
[13:54:06] Starting 'inject:js'...
[13:54:06] Starting 'inject:css'...
[13:54:06] Starting 'inject:scss'...
[13:54:06] gulp-inject Nothing to inject into index.html.
[13:54:06] gulp-inject 4 files into app.scss.
[13:54:06] Finished 'inject:css' after 111 ms
[13:54:06] Finished 'inject:scss' after 108 ms
[13:54:06] gulp-inject 22 files into index.html.
[13:54:06] Finished 'inject:js' after 139 ms
[13:54:06] Finished 'inject' after 139 ms
[13:54:06] Starting 'wiredep:client'...
[13:54:06] Finished 'wiredep:client' after 27 ms
[13:54:06] Starting 'transpile:client'...
[13:54:06] Starting 'transpile:server'...
[13:54:07] Finished 'transpile:client' after 824 ms
[13:54:07] Finished 'transpile:server' after 823 ms
[13:54:07] Starting 'build:images'...
[13:54:07] Starting 'copy:extras'...
[13:54:07] Starting 'copy:fonts'...
[13:54:07] Starting 'copy:assets'...
[13:54:07] Starting 'copy:server'...
[13:54:07] Starting 'styles'...
[13:54:07] Starting 'html'...
[13:54:07] Starting 'constant'...
[13:54:07] Finished 'constant' after 58 ms
[13:54:07] Finished 'copy:assets' after 78 ms
[13:54:07] Finished 'copy:server' after 93 ms
[13:54:07] Finished 'copy:extras' after 95 ms
fs.js:976
  return binding.lstat(pathModule._makeLong(path));
                 ^

Error: ENOENT: no such file or directory, lstat '/Users/michaelmarkieta/Sites/example/examplesite/client/templates.js'
  at Error (native)
  at Object.fs.lstatSync (fs.js:976:18)
  at DestroyableTransform.TransformStream [as _transform] (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-header/index.js:38:12)
  at DestroyableTransform.Transform._read (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:159:10)
  at DestroyableTransform.Transform._write (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:147:83)
  at doWrite (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:313:64)
  at writeOrBuffer (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:302:5)
  at DestroyableTransform.Writable.write (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:241:11)
  at write (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:623:24)
  at flow (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:632:7)
  at DestroyableTransform.pipeOnReadable (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:664:5)
  at emitNone (events.js:86:13)
  at DestroyableTransform.emit (events.js:185:7)
  at emitReadable_ (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:448:10)
  at emitReadable (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:444:5)
  at readableAddChunk (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:187:9)
  at DestroyableTransform.Readable.push (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:149:10)
  at DestroyableTransform.Transform.push (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_transform.js:145:32)
  at DestroyableTransform.endStream [as _flush] (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/index.js:98:10)
  at DestroyableTransform.<anonymous> (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_transform.js:135:12)
  at DestroyableTransform.g (events.js:286:16)
  at emitNone (events.js:86:13)
  at DestroyableTransform.emit (events.js:185:7)
  at finishMaybe (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_writable.js:371:12)
  at endWritable (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_writable.js:378:3)
  at DestroyableTransform.Writable.end (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_writable.js:356:5)
  at Stream.onend (stream.js:59:10)
  at emitNone (events.js:91:20)
  at Stream.emit (events.js:185:7)
  at end (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/map-stream/index.js:116:39)
  at Stream.stream.end (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/map-stream/index.js:122:5)
  at Stream.method [as end] (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/duplexer/index.js:47:39)
  at DestroyableTransform.onend (/Users/michaelmarkieta/Sites/example/examplesite/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js:523:10)
  at DestroyableTransform.g (events.js:286:16)
  at emitNone (events.js:91:20)
  at DestroyableTransform.emit (events.js:185:7)
  at /Users/michaelmarkieta/Sites/example/examplesite/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js:965:16
  at _combinedTickCallback (internal/process/next_tick.js:67:7)
  at process._tickDomainCallback (internal/process/next_tick.js:122:9)

Segmentation fault: 11

@MichaelMarkieta
Copy link
Contributor

FYI, no issues when using grunt serve:dist on a defaults installation with grunt selected instead of gulp.

@MichaelMarkieta
Copy link
Contributor

Seems that the culprit might be gulp-angular-templatecache. Here are some related threads: miickel/gulp-angular-templatecache#124 and gulp-community/gulp-header#37

@MichaelMarkieta
Copy link
Contributor

Confirm that using the advice in gulp-angular-templatecache will fix this issue.

Track miickel/gulp-angular-templatecache#124

npm install --save gulp-header@1.8.2

and gulp serve:dist will work without error.

@sonic182
Copy link
Author

Looks like a possible solution it's as it says here -> miickel/gulp-angular-templatecache#124

"gulp-header": "1.8.2", in package.json

but must be added on the generator to avoid this issue with new scaffoldings

Ohhh I was testing to post the same answer hahaha @MichaelMarkieta

Regards
Johanderson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants