I have a problem with my gulp code.
Every time I try to make a dist file using gulp an error appears.
Something with the GulpUglify tool. (I'm still fairly new to using npm so maybe I did something wrong with the installation. If you think that is the case please explain the exact steps I have to take so that it doesn't go wrong again.
I have tried to find a solution but none of them helped.
I am using es6 in my js code.
Here are some of the links I tried.
(if you need any more info please say so!)
How to minify ES6 functions with gulp-uglify? (this one doesnt have the same error as I do but it might have something to do with es6)
https://github.com/terinjokes/gulp-uglify/issues/249 (I tried to do something with this, but I'm new to gulp and I got my file from a friend so I could have a localhost)
https://github.com/terinjokes/gulp-uglify/issues/281 (etc)
Here is what shows up in the console.
throw er; // Unhandled 'error' event
^
GulpUglifyError: unable to minify JavaScript
at createError (/Users/rubennijhuis/Desktop/Projects/under-construction/node_modules/gulp-uglify/lib/create-error.js:6:14)
at wrapper (/Users/rubennijhuis/Desktop/Projects/under-construction/node_modules/lodash/_createHybrid.js:87:15)
at trycatch (/Users/rubennijhuis/Desktop/Projects/under-construction/node_modules/gulp-uglify/minifier.js:26:12)
at DestroyableTransform.minify [as _transform] (/Users/rubennijhuis/Desktop/Projects/under-construction/node_modules/gulp-uglify/minifier.js:79:19)
at DestroyableTransform.Transform._read (/Users/rubennijhuis/Desktop/Projects/under-construction/node_modules/readable-stream/lib/_stream_transform.js:182:10)
at DestroyableTransform.Transform._write (/Users/rubennijhuis/Desktop/Projects/under-construction/node_modules/readable-stream/lib/_stream_transform.js:170:83)
at doWrite (/Users/rubennijhuis/Desktop/Projects/under-construction/node_modules/readable-stream/lib/_stream_writable.js:406:64)
at writeOrBuffer (/Users/rubennijhuis/Desktop/Projects/under-construction/node_modules/readable-stream/lib/_stream_writable.js:395:5)
at DestroyableTransform.Writable.write (/Users/rubennijhuis/Desktop/Projects/under-construction/node_modules/readable-stream/lib/_stream_writable.js:322:11)
at Readable.ondata (_stream_readable.js:642:20)
at Readable.emit (events.js:159:13)
at addChunk (_stream_readable.js:265:12)
at readableAddChunk (_stream_readable.js:252:11)
at Readable.push (_stream_readable.js:209:10)
at /Users/rubennijhuis/Desktop/Projects/under-construction/node_modules/fork-stream/index.js:51:13
at classifier (/Users/rubennijhuis/Desktop/Projects/under-construction/node_modules/ternary-stream/index.js:20:11)
Related
I've installed Cypress according to the cypress docs. After opening Cypress and selecting a test to run, I instantly get the following error:
**Title:** Error running plugin
Message: The following error was thrown by a plugin. We stopped running your tests because a plugin crashed. Please check your plugins file (C:\Users\metin\Desktop\Programming\School\Typescript\From JS to TS\cypress\plugins\index.js)
Stack trace:
Error: The following error was thrown by a plugin. We stopped running your tests because a plugin crashed. Please check your plugins file (`C:\Users\metin\Desktop\Programming\School\Typescript\From JS to TS\cypress\plugins\index.js`)
at Object.get (C:\Users\metin\AppData\Local\Cypress\Cache\9.1.0\Cypress\resources\app\packages\server\lib\errors.js:1043:15)
at EventEmitter.handleError (C:\Users\metin\AppData\Local\Cypress\Cache\9.1.0\Cypress\resources\app\packages\server\lib\plugins\index.js:189:20)
at EventEmitter.emit (node:events:394:28)
at ChildProcess.<anonymous> (C:\Users\metin\AppData\Local\Cypress\Cache\9.1.0\Cypress\resources\app\packages\server\lib\plugins\util.js:19:22)
at ChildProcess.emit (node:events:394:28)
at emit (node:internal/child_process:920:12)
at processTicksAndRejections (node:internal/process/task_queues:84:21)
I've been googling for a few hours and I'm looking for help on how to resolve this issue!
Uninstall Nodejs
Download the Nodejs (Recommended For Most Users) version from the link:
https://nodejs.org/en/
Install the downloaded Nodejs
I had the same issues
in my case, this issue was related to my bitbucket.yml.file, I changed: max-time:(set time for running your tests) in my job, and everything works fine
If you're using Cucumber then review your step files in search of misspelling keywords or case sensitive typos like wHEN or thEn
I have a Angular 2 TypeScript project. I have updated all of the packages and built the project.
Now I see this error in the console:
zone.js:1265 Uncaught TypeError: Cannot read property 'apply' of undefined
at XMLHttpRequest.desc.get [as ontimeout] (zone.js:1265)
at XHRLocalObject.AbstractXHRObject._cleanup (abstract-xhr.js:149)
at XMLHttpRequest.xhr.onreadystatechange (abstract-xhr.js:125)
at XMLHttpRequest.wrapFn (zone.js:1230)
at ZoneDelegate.invokeTask (zone.js:398)
at Zone.runTask (zone.js:165)
at XMLHttpRequest.ZoneTask.invoke (zone.js:460)
So I can't figure out where the error is in the project code, because there is no project code in the stack trace. There are many HTTP requests at the start. They all succeed (no errors in the network tab), but I see that there is actually no data: no content for <select>. I would like to avoid having to go through my code, removing parts of it and testing whether the error is still there.
Is there any way to figure out where my code is causing this error?
What you describe is a recent issue in the v0.8.8 of Zone.js. See the GitHub issue here. The easiest way for you to avoid this would be to downgrade to 0.8.5 version.
To do this, using npm, just use this command:
npm install zone.js#0.8.5
and consider adding --save at the end of the command to add it to your JSON dependencies.
Alexander is right: check your package.json if there is something like this in there:
...
"zone.js": "^0.8...."
Change the version to something below 0.8.8. This fixed it for me.
events.js:160
throw er; // Unhandled 'error' event
^
Error: Cannot find module 'generator-ng-component/generators/route'
at Function.Module._resolveFilename (module.js:470:15)
at Function.resolve (internal/module.js:27:19)
at child.compose (/usr/local/lib/node_modules/generator-angular-fullstack/generators/route/index.js:7:92)
at Object.<anonymous> (/usr/local/lib/node_modules/generator-angular-fullstack/node_modules/yeoman-generator/lib/base.js:439:23)
at /usr/local/lib/node_modules/generator-angular-fullstack/node_modules/yeoman-generator/node_modules/run-async/index.js:25:25
at /usr/local/lib/node_modules/generator-angular-fullstack/node_modules/yeoman-generator/node_modules/run-async/index.js:24:19
at /usr/local/lib/node_modules/generator-angular-fullstack/node_modules/yeoman-generator/lib/base.js:440:9
at runCallback (timers.js:649:20)
at tryOnImmediate (timers.js:622:5)
at processImmediate [as _immediateCallback] (timers.js:594:5)
It is my guess that it's an issue with the angular-fullstack generators.
I have been encountering the same issue when performing the following command:
yo angular-fullstack:route [myroute]
angular-fullstack generators are now integrating Angular2, but may not be fully finished. For example, endpoints are working
yo angular-fullstack:enpoint [myendpoint]
I assume this because the code for generator-angular-fullstack/generators/endpoint or generator-angular-fullstack/generators/component look very different than generator-angular-fullstack/generators/route.
Unfortunately, this isn't a solution. If I am correct, I guess we can either wait for an update or create new routes manually for now.
EDIT: generator-angular-fullstack#5.0.0-alpha.3.
I'm trying to do a little debugging with node.js, but the stack trace is leading me into a weird file called events.js. (no path is provided)
What is that file? Where can I find it?
Trace: Test
at Socket.socket.on (C:\test\SocketTest\server.js:11:13)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Socket.onevent (C:\test\SocketTest\node_modules\socket.io\lib\socket.js:335:8)
at Socket.onpacket (C:\test\SocketTest\node_modules\socket.io\lib\socket.js:295:12)
at Client.ondecoded (C:\test\SocketTest\node_modules\socket.io\lib\client.js:193:14)
at Decoder.Emitter.emit (C:\test\SocketTest\node_modules\component-emitter\index.js:134:20)
at Decoder.add (C:\test\SocketTest\node_modules\socket.io-parser\index.js:247:12)
at Client.ondata (C:\test\SocketTest\node_modules\socket.io\lib\client.js:175:18)
at emitOne (events.js:96:13)
Quote from the nodejs documentation:
Node.js has several modules compiled into the binary. These modules are described in greater detail elsewhere in this documentation.
The core modules are defined within Node.js's source and are located in the lib/ folder.
Emphasis mine. So if you don't build nodejs from source code, you won't have it on your file system (hence the missing path).
Anyway, you will encounter it in most traces, but its extremely unlikely that it has anything to do with your actual problem.
I'm getting this error when openssl child proccess is trying to write() to local directory.
Connection is closed before write() is called. It isn't connected with the ssl, because I can't even launch example code from nodejs documentation.
What am I missing? Some kind of special rights for nodejs?
Please, can anyone give me a real example how to use childProccess.stdin.write()?
events.js:85
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at exports._errnoException (util.js:746:11)
at Socket._writeGeneric (net.js:690:26)
at Socket._write (net.js:709:8)
at doWrite (_stream_writable.js:301:12)
at writeOrBuffer (_stream_writable.js:288:5)
at Socket.Writable.write (_stream_writable.js:217:11)
at Socket.write (net.js:634:40)
at signManifest (...\node_modules\passbook\lib\pass.js:360:14)
It appeared that i've installed openssl in a wrong way. An error (wrong openssl directory) while execFile(openssl) emitted 'close' event, so write threw EPIPE.
Be careful and add a lot of proper error handlers :)