Validation Error: Preset #vue/cli-plugin-unit-jest not found - vue.js

While executing Jest Test in PHPStorm I receive the following error in the console.
Debugger listening on ws://127.0.0.1:58148/15341a94-78d6-4475-94d6-c89c7e9e3c39
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
● Validation Error:
Preset #vue/cli-plugin-unit-jest not found.
Configuration Documentation:
https://facebook.github.io/jest/docs/configuration.html
Waiting for the debugger to disconnect...
I tried to $ vue add #vue/cli-plugin-unit-jest in order to add plugin but error still persists.

In my case Jest Run/Debug Configuration 'Jest Package' path had to be changed to /your-project-path/node_modules/#vue/cli-service

Related

React-Native: An error occured while attaching debugger to the application. Cannot attach to packager

Problem:
I am new to react-native and when I try to Run and Debug using the Attach to Packager configuration I get the following error:
An error occured while attaching debugger to the application. Cannot attach to packager. Are you sure there is a packager and it is runnig in the port 19001? If your packager is configured to run in another port make sure to add that to the settings.json. (error code 504) (error code 1401)
Solutions attempted:
Attaching "Trace" to settings.json to verify i'm in a react-native project. Found here
Adding port, sourceMaps, and outDir to launch.json. Found here
Here is a screenshot of my settings/what I'm seeing:
My environment is Ubuntu 20.04

How to avoid build failure from ESLint violations with react-scripts/create-react-app?

I created a fresh project using CRA, and then added a custom eslint config with a single rule, no-console, and set it to error log level.
When running yarn start to do development, and putting in a console log, the whole build fails and I get a generic error page saying the build failed because there was a console log. But, I put the log there to debug the app, and this isn't a production build.
I also tried seeing if this could be related to custom eslint configs so I violated the rule-of-hooks rule that is default with CRA and saw the same thing happen.
How can I develop with a linting error present?

Property 'config' does not exist on type 'BrowserObject' in Webdriver.io

I'm using webdirevio to make some tests, and I'd like to access the configs from the tests as described here:
https://webdriver.io/docs/browserobject.html
But when I write browser.config in my tests I get the error in the title.
Edit:
As requested in the comments, wdio version is 5.12.4.
I'm using cucumber.js so I put console.log(browser.config) in my steps but even the IDE (Webstorm) doesn't recognize it
and if I continue to run the test I get the error in the log
ERROR #wdio/runner: TSError: ⨯ Unable to compile TypeScript:
tests/features/step_definitions/steps.ts(84,25): error TS2339: Property 'config' does not exist on type 'BrowserObject'.
This was an issue in webdriver.io.
It was fixed in commit https://github.com/webdriverio/webdriverio/commit/29690864b30efd163c1c82bc28ac124d7948e519
Fix will be present in v5.15.6

Debug Configuration in WebStorm for CucumberJS and TestCafe based project

I am trying to set up WebStorm for one of the TestCafe project integrated with CucumberJS (Link: https://github.com/rquellh/testcafe-cucumber).
I am able to sort the debug configuration so far using WebStorm help, however, when I debug the project, it throws the following error to the console:
I am passing the following cucumber.js arguments:
--require testlab/**/step_definitions/*.js --tags #debug
And while I debug, I get the following error:
ReferenceError: testController is not defined
at World.<anonymous>
Test ignored.
Test ignored.
Failures:
1) Scenario: Searching for TestCafe on GitHub #
testlab\features\finAPIDemo.feature:6
× Given I open the GitHub page # testlab\step_definitions\github.js:5
ReferenceError: testController is not defined
I am expecting the debug to execute correctly, however, it is not working, the alternative I believe would be to write a js config and pass through as mentioned in the CucumberJS document page, however, I am not sure how to achieve that.
Any input or help will be appreciated.
This error only occurs when running cucumber with --tags #debug, and it's not specific to the IDE - you will face the same issue when starting your tests in terminal with node node_modules/cucumber/bin/cucumber-js --tags #debug:
node node_modules/cucumber/bin/cucumber-js --tags #debug
0 scenarios
0 steps
0m00.000s
E:\WebstormProjects\testcafe-cucumber\features\support\hooks.js:77
if (testController.testRun.lastDriverStatusResponse === 'test-done-confirmation') {
^
ReferenceError: testController is not defined
at Timeout.checkLastResponse [as _onTimeout] (E:\WebstormProjects\testcafe-cucumber\features\support\hooks.js:77:9)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
I'm not sure why you need this option... There are no scenarios marked with #debug in your project, as far as I can see.
I'd suggest using a standard Cucumber.js run configuration for debugging. It works fine for me - tests are run, and breakpoints are hit:
You need to add the #debug directive for the scenario that you want to debug.
See the full setup in this help topic.
I would recommend using cucumber profiles and call that profile instead of using cli commands. Looking at the error you are receiving it looks like you are missing more required directories such as a custom world directory?
Under the hooks.js I have updated the import statements with const assignment and that worked for me:
Replaced:
'import errorHandling from "./support/errorHandling.js";\n' +
'import testControllerHolder from "./support/testControllerHolder.js";\n\n' +
with
'const errorHandling = require("./support/errorHandling.js");\n' +
'const testControllerHolder = require("./support/testControllerHolder.js");\n\n' +

VUE project just run on the error

Why the new VUE project just run on the error
They are not exactly errors but warnings. You can choose to ignore them or resolve them. Your console looks fine and is running properly.