gulp + browser-sync - why gulp errors on removing directory from app? - gulp

In a simple gulp + browser-sync project here, all file add/delete/change are working correctly, but when I delete a directory from app gulp/browser-sync throws an error like below:
events.js:72
throw er; // Unhandled 'error' event
^
Error: watch EPERM
at errnoException (fs.js:1030:11)
at FSEvent.FSWatcher._handle.onchange (fs.js:1048:26)
I am not sure where to look for possible problems. If someone can point me to correct direction.

The problem here was an outdated version of BrowserSync.
Updating to the latest version will solve this issue.

Related

Webpack 5 - ERROR in Error: Child compilation failed: Module parse failed: Unexpected character '�' (1:4)

I don't understand what is the problem? Webpack does not compile the project and shows the following error:
ERROR in Error: Child compilation failed: Module parse failed: Unexpected character '�' (1:4)
But I can't figure out where the error derives from, in which module or file, where to look for it? This is the error from my IDE.
At the moment, it gives only 1 error when compiling, before that there were 22 errors. Actions that could lead to this - trying to solve the problem through CSS.
After I removed everything in the code (-webkit-min-device-pixel-ratio: 2), the number of errors was reduced to 1, but I don’t understand what to do next.
My webpack 5 config: webpack.config
If someone knows how to solve this problem, or where to look for the root of evil, please help.
Problem solved! It turned out that in my webpack.config in the image processor, I did not add webp support. And when I added it on the fly, the already assembled project did not take this moment into account. As a result, after restarting the build with the npm run dev command, the updated webpack config file started working as it should! Thank you all for your attention to the issue and the desire to help figure it out! enter image description here

Struggling to get gulp v4 to watch tasks with babel plugin

When I try to gulp watch, I get the following error:
[15:46:56] Task never defined: watch
[15:46:56] To list available tasks, try running: gulp --tasks
Here are my functions from gulpfile.js.
function watchChanges(cb) {
watch(['assets/js/*.js'], parallel(buildSiteJS));
watch(['assets/scss/style.scss', 'assets/scss/**/*.scss'], parallel(compileStyleSCSS));
watch(['**/*.php'], parallel(reloadPage));
cb();
}
With the ending export statement like:
exports.default = parallel(serveBrowserSync, mainTasks, watchChanges);
I'm not sure if the syntax is incorrect causing the 'task never defined' error and I've tried a lot of searching online and not got anywhere with it.
Let me know if you need to see more of the gulpfile.js.
Gulp: 4.0.2
Gulp Babel: 8.0.0

Rendering Error when executing Yarn Run with Boilerplate and Electron-React

I am very new to this and will probably have a hard time explaining the problem well. I am using boilerplate and electron react to open a webpage. Up until today it was working fine, however all of a sudden my console reads an error when using
yarn run
The error is:
Failed to load resource: the server responded with a status of 404 (Not Found) renderer.dev.js:1
The window appears but nothing renders.
I've tried to revert my commits but the problem doesn't go away, I'm unsure of what route to pursue with the problem.
Any guidance would be appreciated
EDIT
It looks like sajad saderi's suggestion of removing node_modules and reinstalling it removed the specific error message, and my renderer.dev.js file has loaded. However, now the following appears
Uncaught Error: None of the binaries loaded successfully. Is your node version >= 10.15 ?
at failIfNoBinaryExported (renderer.dev.js:192034)
at Object.liveLoad (renderer.dev.js:192030)
at Object../node_modules/msnodesqlv8/lib/bootstrap.js (renderer.dev.js:192050)
at __webpack_require__ (renderer.dev.js:771)
at fn (renderer.dev.js:131)
at renderer.dev.js:192072
at Object../node_modules/msnodesqlv8/lib/connection.js (renderer.dev.js:192508)
at __webpack_require__ (renderer.dev.js:771)
at fn (renderer.dev.js:131)
at Object.<anonymous> (renderer.dev.js:194552)
The program is meant to gather data from an SQL Server using Electron React, Boilerplate, and msnodesqlv8

how to resolve ResolveLibraryProjectImports" task failed unexpectedly Exception

ResolveLibraryProjectImports" task failed unexpectedly
System.IO.FileNotFoundException Could not load assembly
I have tried to resolve it like clean bin, obj rebuild again said in the previous results of this issue but it doesn't work for me. Does anyone have a solution for this issue, please help me.
Note: I am having an error in Mono.Android in the References of portable code is this the problem and how to resolve this also?
This is the error I get:
Error The "ResolveLibraryProjectImports" task failed unexpectedly. System.IO.FileNotFoundException: Could not load assembly 'SampleProject, Version=0.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'SampleProject.dll'
at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(String fullName)
at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract(DirectoryAssemblyResolver res, ICollection1 jars, ICollection1 resolvedResourceDirectories, ICollection1 resolvedAssetDirectories, ICollection1 resolvedEnvironments)
at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() SampleProject.Android Build
=> delete all from C:\Users\username\AppData\Local\Xamarin
=> delete .vs folder
=> restart visual studio in run as admin(if not).
=> clean and rebuild.
Mono.Android is purely a native Android dll for Xamarin.Android
using this in your portable project will throw an error (Of Course.)
This might be the issue if the error still persists after removing the dll then I would suggest you remove the bin obj folders and clean build and in case it still persists you should upload the output window for the debug build as well as error list explanation for this particular error.

Get Chrome stack trace of error object relative to sourceURL

When using Chrome I am getting an error via the Mocha test runner, captured as part of afterEach with this.currentTest.err.
I am compiling coffeescript with browserify with the debug option using the awesome coffeeify plugin. This produces a single compiled file bundle.js with a sourceMappingURL=data:... that allows me to view and debug the original coffeescript directly.
Unfortunately when I access the err.stack in the afterEach Mocha hook, the stack contains references to bundle.js and not the corresponding .coffee files, which would be much more useful.
Here is some sample code with browserify.
First, installing it (for convenience) with npm:
$ npm install -g browserify; npm install coffeeify
x.coffee
try
throw Error("Thrown.")
catch err
console.log err.stack
Convert to x.js with:
$ browserify -t coffeeify x.coffee -d > x.js
x.html
<html>
<head>
<script src='x.js'></script>
</head>
<body></body>
</html>
If one opens this in Chrome the dev tools will show x.js, x.coffee (from the sourceMapURL) and x.html.
When we run this HTML page we get the following output to the console:
Error: Thrown.
at Error ()
at Object. (file://localhost/Users/bmh/tmp/x.js:5:9)
at i (file://localhost/Users/bmh/tmp/x.js:1:219)
at err (file://localhost/Users/bmh/x.js:1:382)
at file://localhost/Users/bmh/tmp/x.js:1:400
What we would expect is to have the trace refer to the .coffee file, looking something like this (which I am making up here for illustrative purposes):
Error: Thrown.
at Error ()
at Object. (file://localhost/Users/bmh/tmp/x.coffee:2:5)
Has anyone had any success converting the error stack to one that refers to the items at their source map locations?
I'm not sure about coffeeify, but the source-map-support module adds .stack support for code bundled with browserify. Just npm install source-map-support and put require('source-map-support').install() at the top of your code.