'Cypress Config File does not exist' - Lambdatest can't see cypress configuration file - vuejs2

I've got installed Cypress on my Vue project and created just a few simple tests that perform great when I run Cypress with this command npx cypress open.
I am trying to implement automatisation with the help of Lambdatest but when I run command lambdatest-cypress run I receive this message in return:
Checking Lambda Config in current directory
Validating CLI
validating config
Error!! Cypress Config File does not exist
I have installed Lambdatest cli globally, added lambdatest-config.json in the root of my project, and updated "lambdatest_auth" data in this file. Also I've got cypress.config.js on the same root level in project's directory. Cypress's config file does not show any errors excluding eslint saying that
on this part
setupNodeEvents(on, config) {
// implement node event listeners here
},
on and config are declared but never used.
Do you have any ideas why I can not run this one using Lambdatest?

As always maybe someone will find it useful.
So... it would seem that in some cases lambdatest get's a little bit lost and it's config is not filled with the things it should be :)
The solution was to remove this line of code in lambdatest-config.json file which is located in the project root directory.
"cypress_config_file": "cypress.config.js", <-- remove this line

Related

How do I import variables from .env in Intellij IDEA Protractor (JS) debug?

I have recently introduced a .env file to a Typescript Protractor project. I installed dotenv package, and run dotenv.config() at the very top of the protractor config file. When executed from console, all works as expected, .env is loaded, everyone's happy.
However when I execute from IntelliJ IDEA's debug tool (configured for Protractor), the .env file doesn't load - even though the code goes through dotenv.config().
I can work around by setting env variables in the debug config, but that has to be done manually, and I would prefer to source these values from the .env file automatically (source .env in a "before launch" script doesn't help either).
Can this be done using just Cucumber.js package? If not, which package would help?

Blazor Javascript isolation with NPM dependencies

I'm trying to use the new Blazor Javascript isolation feature. I'm importing my own JS file as per the example ExampleJsInterop.cs. It works until I try to import an NPM module from within my script. In my package.json I have set up a dependency on interactjs, and in my script I have added import interact from 'interactjs'; at the top.
I'm getting a Failed to resolve module specifier "interactjs" error. I'm not sure how to get past that.
Previously I was using Webpack to bundle my script and dependencies together into a single file that is added into my index.html as a tag. This was working fine, but I'm not sure how to continue using NPM packages with JS isolation.
Thanks!
A bit late, but I've just finished solving a similar issue.
The npm files are installed to the hidden node_modules folder. This isn't available to your script when you are running your app, unless you do something to make it available. however, even if you copied the interactjs file into your scripts folder it would still not work if it was an npm file. Those are meant to run in nodejs not a browser. So you would still need to use your bundler. I tried webpack, but had some issues with certain files so ended up with snowpack instead. I just finished a bunch of articles on javascript interop - part 4 deals with npm
I forgot that I left this question open for almost a year!
I ended up solving it using Snowpack to bundle the NPM package into the Blazor wwwroot folder. Credit goes to this article for pointing me in the right direction: https://nbarraud.github.io/js-in-blazor.html

Vue.js: To Get Environment Variables in js File

I have created .env file to set environment variables as shown below:
Inside which I have given below mentioned code.
VUE_APP_BASEURL="https://qa-apps-nodejs.Dtech.com:9000/"
PORT=8080
I have written below code in my js file and executed npm install dotenv:
require('dotenv').config();
console.log(process.env.VUE_APP_BASEURL);
With the above code, I need to get https://qa-apps-nodejs.Dtech.com:9000/ in console. But instead I'm getting:
undefined
Just restart your server as newly created env variables are not available only after hot-reload you have to rebuild your application (restart your server). For reference you can look here
No need to install "dotenv" simply place .env file in the root of your project (at the same level of your package.json file) and Vue CLI will handle the reset. Side note; as of Vue CLI 3 only variables that start with VUE_APP_ will be loaded. make sure also to rerun npm run serve again to restart your server.
for more details: visit docs

Stylelint error in PhpStorm IDE : no configuration provided

I cannot make stylelint to work in PhpStorm
"C:\Program Files\nodejs\node.exe" "K:/dev/npm packages/node_modules/stylelint/bin/stylelint.js" -f json --stdin-filename ..\..\..\..\..\..\..\..\:/dev/D8/themes/amu_www/css/style.css
K:\:\dev\D8\themes\amu_www\css\style.css
Error: No configuration provided for K:\:\dev\D8\themes\amu_www\css\style.css
at module.exports (K:\dev\npm packages\node_modules\stylelint\lib\utils\configurationError.js:8:28)
at stylelint._fullExplorer.load.then.then.config (K:\dev\npm packages\node_modules\stylelint\lib\getConfigForFile.js:47:15)
Process finished with exit code 78
I have placed a stylelintrc.json config file about everywhere I could think of but I don't know in which folder it is supposed to be put.
it was a .stylintrc.json and placing it just above the app working directory makes it foundable
In my case, the problem was that my Webstorm IDE is always looking for the configuration file in the project root directory, while my stylelint.config.js was located in configs/stylelint.config.js.
I've solved by moving it to the root.

Webpack module resolution issues on Windows 10

I'm having issues with Webpack resolving module names on Windows. The loaders are installed, but the path Webpack is using to try to resolve them is incorrect (notice the fact that it's concatenated the module path to the working directory below). Webpack is being launched with webpack-dev-server.
ERROR in ./~/css-loader?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./~/postcss-loader?parser=postcss-scss!./client/src/scripts/components/Main/Main.css
Module build failed: (SystemJS) ENOENT: no such file or directory, open 'C:\Users\Terry\Projects\django-react\C:\Users\Terry\Projects\django-react\node_modules\css-loader\index.js'
Error: ENOENT: no such file or directory, open 'C:\Users\Terry\Projects\django-react\C:\Users\Terry\Projects\django-react\node_modules\css-loader\index.js'
at Error (native)
Error loading C:/Users/Terry/Projects/django-react/C:\Users\Terry\Projects\django-react\node_modules\css-loader\index.js
# ./client/src/scripts/components/Main/Main.css 4:14-225 13:2-17:4 14:20-231
# ./client/src/scripts/components/Main/Main.jsx
# ./client/src/index.js
# multi main
webpack: bundle is now VALID.
Relevant info:
Windows 10
Node 6.6.0
I'm running webpack with babel-node via NPM script
Webpack 2.1.0-beta.22
NPM 3.10.3
EDIT: this usually only happens when I make an edit that triggers a hot reload. Sometimes it happens when I launch webpack-dev-server the first time, but it happens every time I edit the source.
Not sure if you ever figured this out, but I was running into the same exact error with the malformed node_modules path when using webpack on Windows 10. I was very disappointed to find that nobody was able to solve this since this particular error does not seem to be documented anywhere else.
In my own debugging I found that this error only happens with webpack loader modules, so I dug into webpack to track down where the error was coming from. After some digging it turned out that this was caused by the loader-runner package used by webpack. It attempts to use System.import to resolve the loader module, with a fallback on require when System.import is not available. In my case, the malformed node_modules path was being generated by System.import via systemjs. It appears that the systemjs implementation of System.import has a bug when absolute paths are used on Windows, and since webpack passes an absolute path for loaders, it throws an error.
I was able to work around this by editing my local copy of loader-runner, and comment out the System.import, forcing it to use require instead. This is, of course, not a good long term solution by any means so I am still looking for something better. I just tried switching to yarn to see if maybe this is an npm dependency issue, but this workaround should get you up and running if you're still getting these errors on Windows.