ERROR #wdio/runner: Error: Unable to load spec files quite likely because they rely on `browser` object that is not fully initialised - webdriver-io

After running npm install getting the following error: ERROR #wdio/runner: Error: Unable to load spec files quite likely because they rely on browser object that is not fully initialised
The code was running fine, only after npm install getting this error.

I after long trouble shooting it turned out to be one of my script had one line not correctly commented out, instead of // I had /. Now all is working.

Related

how to solve module build failed after changing file extension ( *.ts => *.tsx )?

after changing a specific file's extension from .ts to .tsx I get:
Compiled with problems:X
ERROR in ./src/components/SomeComp/someFile.ts
Module build failed (from ./node_modules/source-map-loader/dist/cjs.js):
Error: ENOENT: no such file or directory, open '.../someFile.ts'
ERROR
No files matching 'C:\Users...\src\components\SomeComp\someFile.ts' were found.
it has happened recently and somehow figured out on its own,
then i switched branches and when returned it happened again
I tried what was suggested here, clearing the browser cache How to get Chrome to reload source maps?
also restarted the react dev server couple of times
but still it tries to find the file with the old .ts extension...
searched as much as I could but didn't find a solve...
edit:
after changing the extension back and forth and restarting the dev server it has figured out, but I would still love to know what was happening and what perhaps what should be done to handle this situation correctly in the future

Cannot use import statement outside a module when using wrangler v2

I'm new to using cloudflare and wrangler. I've a project that I've been working on, and I'm now trying to deploy it using wrangler publish, but I keep running into issues. My product is coded in node.js, and I'm using version 2 of wrangler. When I execute wrangler publish I get:
Basic JavaScript project found. Skipping unnecessary build!
Error: Something went wrong with the request to Cloudflare...
Uncaught SyntaxError: Cannot use import statement outside a module
at worker.js:2Basic JavaScript project found. Skipping unnecessary build!
Error: Something went wrong with the request to Cloudflare...
Uncaught SyntaxError: Cannot use import statement outside a module
at worker.js:2
I've searched for a solution, and one of them that I found said to change module in wrangler.toml from type="javascript"to type="webpack" however that gives me a bunch of errors:
./node_modules/destroy/index.js
Module not found: Error: Can't resolve 'fs' ... Parsed request is a module...resolve as module
/Users/Desktop/APIs/cpiCalculator2/node_modules/destroy/node_modules doesn't exist or is not a directory
...
Error: webpack returned an error. You may be able to resolve this issue by running npm install.
I've tried reinstalling npm as it suggests and then wrangler publish again, but that just gives me the same error message.
I'm really not sure what the issue is, and I would really appreciate any help or advice on how to resolve this issue. Thank you!
Also, just a note, I'm not sure if this is affecting it, but I do have two other js documents in the main area of my project (where my index.js file is).

Error: Cannot find module 'C:\Users\ADMIN\AppData\Roaming\npm\node_modules\chainbridge-solidity-cli\index.js'

I am getting this error while, deploying the gorli test network, which is the first step.
I even tried npm i, but I believe this is a global thing.

Unable to resolve module `some-name` from `Path/To/Project/script.js`

I tried to require("some-name"); in my script.js. This gave me the following error:
Unable to resolve module some-name from Path/To/Project/script.js: Module does not exist in the module map.
So I removed the require("some-name"); in the script.js. The same error occurred.
So I went to a previous state of the app. The error keeps happening and there is nowhere in the code that I request the "some-name" file nor I have the file in my directory.
Here an image where I search in my code to the old file name:
The screen shot of the error in react-native.
I tried the steps shown in the error message and it did not resolve the problem.
It is possible to add more information if it is unclear.
The problem is the cache.
This problem was fixed by:
renaming the file where the error came from.
restarting the server.
Due to the file renaming the server took the updated project with out the error. This problem was solved with the help of Nikhil Parmar in this chat.
The error was already fixed in the code but the server still used the cached project. A normal cache clear and server restart did not work.

EPIPE error uploading img to s3 using imagesquish

I've been testing imagesquish for a while and I can't seem to have it working.
It works with node.js, forever, express and knox and basically does image processing on the fly.
I'm trying to call an image on a server, it resizes, crops or whatever and then uploads to s3.
I've had permission issues but after creating a new s3 bucket, it seems I made some progress but then, the image doesn't get uploaded and I can't get any error.
I managed to go through it's code and go all the way to exports.uploadImage that would call img.toBuffer but apparently it doesn't get called.
At the end, I get the error:
events.js:72
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at errnoException (net.js:904:11)
at Object.afterWrite (net.js:720:19)
error: Forever detected script exited with code: 8
error: Script restart attempt #1
I need some help on this. Does anybody have any idea?
Luis. Not sure if you're still interested in an answer to this. I'm the author of ImageSquish. From the information you provide, this sounds like img.toBuffer is failing which is usually because graphicsmagick is not installed. The latest version of ImageSquish checks for the existence of this library on startup (see https://github.com/dmcquay/imagesquish/blob/master/check.js).
You might also find it easier to try it out using docker (https://registry.hub.docker.com/u/dmcquay/imagesquish/) so you don't have to worry about installing anything.
If this doesn't resolve your problem, you can find me via irc on freenode #imagesquish.