Travis-CI run failed, but passed locally - node.js

I'm learning Yeoman & I've made a generator for ionic-framework
Source Code Here
When I run $ npm test, It works fine locally.
But when I pushed it to GitHub, the Travis-CI always failed.
I try to set timeout of gulp-mocha to 20000ms, but it still doesn't work.
Is there anyone knows the reason why? Thx.

Finally, I found the reason.
It's version of node. 5.10.1 works

Related

npm run graphql-deploy command stuck in Sanity

When I am running, the command npm run graphql-deploy in my local it stuck at lerna info Executing command in 1 package: "npm run graphql-deploy". Not moving forward.
And if I run same command in studio folder it stuck at:
GraphQL API deployed to:
https://qht1v59y.api.sanity.io/v1/graphql/development/default
Please refer screenshot
So due to this I am not able to deploy my changes. What's the issue here. How to fix this ?
If you never found a fix for this, it was merged into #sanity/cli. I just updated it and seems tow work fine now.
https://github.com/sanity-io/sanity/pull/2987

cypress cache clear hanging

For context I am working in windows 10 with Node.js.
Having set up cypress successfully after a load of trial and error in one project file I am starting from scratch with another project file to work out the exact steps.
For some reason it is failing with the new attempt and having noticed the errors show v 7/3/0 whereas the errors for the previous showed v 7.2.0 I thought I'd return to the first project file and try
cypress clear cache as recommended at docs.cypress.io/guides/references/troubleshooting which I've assumed that was to be run at the Node.js command prompt.
Having done so Node.js is just hanging.
Is this expected behaviour?
Have I misunderstood the instructions?
Thanks

Cypress verification timed out after 30000 milliseconds

I am using cypress 5.0 in JS project. When I try to run npx cypress open keep getting error verification timed out after 30000 milliseconds.
Node version: v12.18.2
OS: Windows 7
Cypress : 5.0.0
I have downgraded to Cypress 4.0.0 and downgraded my node too. But keep getting the error. Please find the screenshot below. 2
I had a similar issue and I used the npx cypress verify to carry out the verification.
This happens because there's a verification that's meant to happen for first-time users but for some reason, the verification process times out.so one way to make the verification work is by using the npx cypress verify package.
This issue is not related to Cypress version. To resolve it, you need to increase the default timeout.
Open node_modules\cypress\lib\tasks\verify.js, search for VERIFY_TEST_RUNNER_TIMEOUT_MS and change it from 30000 (default) to 100000.
Save the file, then try to open the runner.
Retrying launching Cypress one more time worked out with the error being gone, hmm...
From Cypress version 9.2.0, you no longer have to change the timeout value in node_modules\cypress\lib\tasks\verify.js file manually.
Instead, you can utilize an environment variable called CYPRESS_VERIFY_TIMEOUT "to override the timeout duration of the verify command". Here is the link to the documentation about cypress verify command that mentions it.
Even better, starting from version 9.3.0, we can set the environment variable in a project's package.json or .npmrc (or .yarnrc) file.
Using this environment variable to increase the timeout (3 minutes for us) was necessary for us to ensure stability in our CI testing pipeline.
It's all due the Cache. Clear the cache it will automatically set.
I got the solution from this article. Follow the last step:
npm cache clean --force
https://softans.com/clear-cache-file-in-cypress/
Rerun it. It will work.
Rerunning it verified the cypress.
I had the same problem, running Cypress in WSL 2 would throw the same error even after trying all the solutions here.
I realised my Xserver was not running, started it up and everything worked again.
Please try this
go to path: node_modules\cypress\lib\tasks\verify.js, and you need to increase the default timeout.
Open verify.js, search for the variable VERIFY_TEST_RUNNER_TIMEOUT_MS. By default it should be 30000. Change it to 100000.
Save and try to open the runner. I hope now you will able to run the tests.
To resolve this issue, you need to increase default timeout. For this, go to below path: node_modules\cypress\lib\tasks\verify.js & Open verify.js, search variable VERIFY_TEST_RUNNER_TIMEOUT_MS. By default it should be 30000. Change it to 100000.
I also got this error , so I relaunch the cypress again(Which works for me) and also to be on safe side i have change the default duration with 100000s for future.
I just had the same problem, I solved it just by disabling the antivirus [Windows 10].
1st time using this tool today on my CentOS system.
Got the same error when trying to run cypress open and cypress verify.
Tried clearing the cache, reinstalling and all that fun stuff.
Nothing fixed it.
Note: I had VSCode running on my system and I had recently started the Angular ng test to test other tests.
Apparently something with ng test interferes with Cypress. Once I turned off ng test and tried to open and verify Cypress it worked.
Cypress 9.1.1
Problem with Windows was restarting the terminal, probably the PATH was not correctly updated.

Cannot find module 'assetmanager'

I'm trying to run the MEAN stack on windows. I've installed all the pre-requisites (I think) but when I try to start the server via the gulp command I get the error:
Error: Cannot find module 'assetmanager'.
IMAGE:
I have tried running npm install assetmanager which run fine but I still get this error.
This is my first time trying to run node on a machine (I should have used a linux box) so go easy on me as I am learning :-).
Any and all help appreciated.
David
I had exactly the same problem on Linux Mint 17.2.
The failing way: This was my first project that I'd generated and I don't think I had all the dependencies installed before I ran the init command (g++ was missing).
I tried the npm install assetmanager command as you did and then install worked. Running gulp after this, it got further but this time I was missing mongoose. I installed that then it couldn't find .../config/env/all so I sylinked the default.js config. Then running gulp again, errorhandler was missing. I figured it shouldn't be this hard so...
The working way: I deleted that failure of a project and init'd a new one and it worked. Unfortunately I'm not sure if the init didn't work the first time but I missed the error/warning or something else caused it. All I can recommend is try creating another project and see if that works.

heroku running gulp build

i am trying to install a node app onto heroku. My application requires both gulp build and gulp install to be called on the server upon instillation, however i am having troubles doing this.
I have tried writing this inside of the package.json:
"scripts":"gulp build && gulp install"
which works at first, but after about an hour the server must restart and recall the script causing for the contents of the server to be rebuilt. this removes all of my content such as newly written blogs or changes.
I have also tried using the heroku toolbelt
heroku run gulp build
heroku run gulp install
However, even though it produces the correct console write lines and looks asif it has made the necessary changes, it hasn't, the server produces an error which proves that the resources haven't been built meaning that the console command didnt make any changes to the actual server files.
Am i missing something out here? Thanks in advance.
So i have figured out that the problem lies with the fact that i have tried to use a LevelDB database on heroku. Apparently, heroku uses no-writable dynos, meaning that the levelDB database is unable to save.

Resources