EPERM during gulp commands - node.js

I have a gulpfile that I am using together with Browserify, Babelify and BrowserSync to implement my build workflow. However, I am constantly having problems with EPERM errors in Node.js.
I first had an error in my gulp clean task that used rimraf in order to clean my dist directory. The task would occasionaly throw an error (I was not able to reproduce the error 100% of attempts though). The error was an EPERM that complained about the unlink action for ./dist/app.js. I tried using del instead of rimraf and for some reason it helped.
However, if I run gulp watch and something changes , there is very often this error now:
(node:10740) 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.
[22:52:35] Using gulpfile D:\Workspace\milestones\gulpfile.js
[22:52:35] Starting 'clean'...
[22:52:35] Finished 'clean' after 4.2 ms
[22:52:35] Starting 'build-persistent'...
[22:52:37] Finished 'build-persistent' after 1.55 s
[22:52:37] Starting 'watch'...
[22:52:37] Finished 'watch' after 92 ms
[BS] Local URL: http://localhost:3000
[BS] External URL: http://192.168.0.108:3000
[BS] Serving files from: ./
[22:52:48] Starting 'clean'...
[22:52:48] Finished 'clean' after 2.77 ms
[22:52:48] Starting 'build-persistent'...
stream.js:74
throw er; // Unhandled stream error in pipe.
^
Error: EPERM: operation not permitted, open 'D:\Workspace\milestones\dist\app.js'
at Error (native)
The full gulpfile may be seen in the gist here.
I am running Windows 10.
Update: The issue seems to be absent when running gulp build and therefore might be caused by BrowserSync.

Related

gulp trust-dev-cert without error, but access the page still failed

After I upgrade my Nodejs to v9.3.0 and NPM to 5.5.1, failed to access the gulp serve server. The browser show the unsafe TLS security error.
I have removed ~.gcb-serve-data/, and run the gulp trust-dev-cert without error, but I cannot find the cert in my trust certificates, I am working in Win10.
Following is the **gulp trust-dev-cert" output:
[18:30:14] Starting gulp
[18:30:14] Starting 'trust-dev-cert'...
[18:30:14] Starting subtask 'configure-sp-build-rig'...
[18:30:14] Finished subtask 'configure-sp-build-rig' after 7.48 ms
[18:30:14] Starting subtask 'trust-cert'...
[18:30:14] Finished subtask 'trust-cert' after 79 ms
[18:30:14] Finished 'trust-dev-cert' after 90 ms
[18:30:14] ==================[ Finished ]==================
gulp trust-dev-cert must be executed IN the project folder.

Ember build failed

I'm trying run an Ember project locally : https://github.com/cosmicjs/ember-real-estate-website?files=1. I'm using pycharm 2017 using git-bash as my terminal in win7. I have npm , node and ember installed . In pycharm my project looks like the screenshot.
After switching to the cosmic-real-estate folder:
$ ember build
Running without permission to symlink will degrade build performance.
See http://ember-cli.com/user-guide/#windows for details.
cleaning up...
Build failed.
The Broccoli Plugin: [Funnel: Funnel: index.html] failed with:
Error: EISDIR: illegal operation on a directory, symlink 'e:\ember-real-estate-website\cosmic-real-estate\app' -> 'e:\ember-real-estate-website\cosmic-real-estate\tmp\funnel-input_base_path-ZStiRJkX.tmp'
at Error (native)
at Object.fs.symlinkSync (fs.js:1069:18)
at symlinkWindows (e:\ember-real-estate-website\cosmic-real-estate\node_modules\symlink-or-copy\index.js:123:18)
at symlinkOrCopySync (e:\ember-real-estate-website\cosmic-real-estate\node_modules\symlink-or-copy\index.js:63:5)
at e:\ember-real-estate-website\cosmic-real-estate\node_modules\broccoli-plugin\read_compat.js:86:11
at tryCatch (e:\ember-real-estate-website\cosmic-real-estate\node_modules\rsvp\dist\rsvp.js:539:12)
at invokeCallback (e:\ember-real-estate-website\cosmic-real-estate\node_modules\rsvp\dist\rsvp.js:554:13)
at publish (e:\ember-real-estate-website\cosmic-real-estate\node_modules\rsvp\dist\rsvp.js:522:7)
at flush (e:\ember-real-estate-website\cosmic-real-estate\node_modules\rsvp\dist\rsvp.js:2414:5)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
The broccoli plugin was instantiated at:
at Funnel.Plugin (e:\ember-real-estate-website\cosmic-real-estate\node_modules\broccoli-plugin\index.js:7:31)
at new Funnel (e:\ember-real-estate-website\cosmic-real-estate\node_modules\broccoli-funnel\index.js:58:10)
at EmberApp._rawAppIndex (e:\ember-real-estate-website\cosmic-real-estate\node_modules\ember-cli\lib\broccoli\ember-app.js:694:12)
at EmberApp.index (e:\ember-real-estate-website\cosmic-real-estate\node_modules\ember-cli\lib\broccoli\ember-app.js:678:20)
at EmberApp.toArray (e:\ember-real-estate-website\cosmic-real-estate\node_modules\ember-cli\lib\broccoli\ember-app.js:1661:12)
at EmberApp.toTree (e:\ember-real-estate-website\cosmic-real-estate\node_modules\ember-cli\lib\broccoli\ember-app.js:1684:38)
at module.exports (e:\ember-real-estate-website\cosmic-real-estate\ember-cli-build.js:26:14)
at Builder.setupBroccoliBuilder (e:\ember-real-estate-website\cosmic-real-estate\node_modules\ember-cli\lib\models\builder.js:56:19)
at new Builder (e:\ember-real-estate-website\cosmic-real-estate\node_modules\ember-cli\lib\models\builder.js:30:10)
at BuildTask.run (e:\ember-real-estate-website\cosmic-real-estate\node_modules\ember-cli\lib\tasks\build.js:15:19)
There is a new node_modules folder visible as well:
How can I get this working?

when I'm run the gulp bundle command I'm getting below errors

I'm new to javascript world and I'm currecntly using jspm, gulp, typescript and babel when I run the command gulp bundle I'm getting this
[15:52:39] Finished 'build-system' after 1.95 s
[15:52:39] Finished 'build' after 2 s
[15:52:39] Starting 'bundle'...
[15:52:39] 'bundle' errored after 394 ms
[15:52:39] Error on fetch for animal.js at file:///D:/vetserve/Vetserve.Web/src/
Vetserve.Web.Appts/dist/animal.js
Error: ENOENT: no such file or directory, open 'D:\vetserve\Vetserve.Web
\src\Vetserve.Web.Appts\dist\animal.js.map'
at Error (native)

Unable to run (gulp serve) Google Polymer Starter Kit v1.1.0 on Windows

I need help please!
I have been able to effortlessly install and run all previous versions of the PSK. I have spent hours now trying to get 1.1.0 to run in my environment. I have done everything I can think of. From googling the error to reviewing all current issues with this version here. Any of the suggested fixes dont work for me.
I have made no code changes and I am running CMD as the Admin.
When I grab a fresh copy of the repository and do the NPM & Bower installs, then run "gulp serve" I get the following error no matter what:
C:\FrontEnd\polymer-starter-kit>gulp serve
[09:45:33] Using gulpfile C:\FrontEnd\polymer-starter-kit\gulpfile.js
[09:45:33] Starting 'styles'...
[09:45:33] Starting 'elements'...
[09:45:33] Starting 'images'...
[09:45:33] Finished 'elements' after 249 ms
[09:45:33] styles all files 98 B
[09:45:33] Finished 'styles' after 590 ms
[09:45:34] images all files 35.41 kB
[09:45:34] Finished 'images' after 357 ms
[09:45:34] Starting 'serve'...
[09:45:34] Finished 'serve' after 73 ms
[PSK] Access URLs:
------------------------------------
Local: http://localhost:5000
External: http://xxx.xxx.x.x:5000
------------------------------------
UI: http://localhost:3001
UI External: http://xxx.xxx.x.x:3001
------------------------------------
[PSK] Serving files from: .tmp
[PSK] Serving files from: app
events.js:141
throw er; // Unhandled 'error' event
^
Error: spawn cmd ENOENT
at exports._errnoException (util.js:837:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at doNTCallback2 (node.js:429:9)
at process._tickCallback (node.js:343:17)
My Environment:
All Required Prerequisites
Windows 10
Node.js v4.1.1
NPM v3.3.4
Bower v1.5.3
I am also not sure how to get a more detailed stack trace.
What should I do?
Thanks for the help!
It turns out I needed to add C:\Windows\System32 to my PATH vars. So strange. When I did that everything work like a charm.

Error in plugin 'gulp-notify': No reporter specified

I am trying to build a Sails.js and AngularJS app following this tutorial:
http://thoughtsmarkeddown.com/thoughts/javascript/setting-up-a-sails-js-with-angular-js-app-part-1/
I have setup my Sails App and angular App. Ater setting up the gulp file, which can be found here:
http://thoughtsmarkeddown.com/assets/Uploads/gulpfile.js
I ran the command gulp from my root folder and got the following error:
stream.js:94
throw er; // Unhandled stream error in pipe.
^
[gulp] Error in plugin 'gulp-notify': No reporter specified.
I have no idea how to debug this. This is my first AngularJS app. Was just trying to use it with Sails for eaiser and faster development. If I am doing it the wrong way, can you suggest me some place else I should read about how to make a AngularJS + Sails.js app.
Following is the full stack trace:
[11:22:30] Using gulpfile ~/Prophesee Media/PropheseeDashboard/gulpfile.js
[11:22:30] Starting 'sass'...
[11:22:30] Finished 'sass' after 7.93 ms
[11:22:30] Starting 'sailsbasejs'...
[11:22:30] Finished 'sailsbasejs' after 3.04 ms
[11:22:30] Starting 'angularappjs'...
[11:22:30] Finished 'angularappjs' after 1.26 ms
[11:22:30] Starting 'bowerjs'...
[11:22:30] Finished 'bowerjs' after 5.78 ms
[11:22:30] Starting 'angularviews'...
[11:22:30] Finished 'angularviews' after 446 μs
[11:22:30] Starting 'watch'...
[11:22:30] Finished 'watch' after 216 ms
[11:22:30] Starting 'default'...
[11:22:30] Finished 'default' after 5.71 μs
stream.js:94
throw er; // Unhandled stream error in pipe.
^
[gulp] Error in plugin 'gulp-notify': No reporter specified.
at report (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp- notify/index.js:70:34)
at Transform.notify [as _transform] (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp-notify/index.js:19:5)
at Transform._read (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp-notify/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at Transform._write (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp-notify/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
at doWrite (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp-notify/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:238:10)
at writeOrBuffer (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp-notify/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:228:5)
at Transform.Writable.write (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp-notify/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:195:11)
at Stream.ondata (stream.js:51:26)
at Stream.EventEmitter.emit (events.js:95:17)
at queueData (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp/node_modules/vinyl-fs/node_modules/map-stream/index.js:43:21)
What version of gulp-notify you are using? We had a similar issue on a CI-system on a linux machine (see this issue). To solve this we've updated gulp-notify to the actual version 1.3.1.
To update your dev-dependencies you must remove the actual version first and install it again. It's a known bug from npm that you cannot use npm update on dev-dependencies. So what do I do?
# remove
npm rm --save-dev gulp-notify
# install again
npm install --save-dev gulp-notify
May it's helpful for you.
Ciao
Ralf
It's a known issue:
https://github.com/webcomm/magento-boilerplate/issues/32
solution:
update gulp to 3.5.6
"devDependencies": {
"gulp": "~3.5.6",
}
Try below command :
npm install --save gulp-notify //use save this will save the dependencies in package.json
Hope this will work!!

Resources