When I open Cypress it gets in an infinite loading loop.
I also can see the following error on the promp:
√ Verified Cypress! C:\...\AppData\Local\Cypress\Cache\10.3.1\Cypress
Opening Cypress...
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module '"C:/.../AppData/Local/Cypress/Cache/10.3.1/Cypress/resources/app/node_modules/#packages/server/lib/plugins/child/register_ts_node.js"'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at Module._preloadModules (internal/modules/cjs/loader.js:901:12)
at preloadModules (internal/bootstrap/node.js:601:7)
at startup (internal/bootstrap/node.js:273:9)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
Also when I first open cypress it takes a lot of time, more than 3 minutes... but the first time it opens OK
npx cypress open
It looks like this is your first time using Cypress: 10.3.1
✔ Verified Cypress! C:\Users\...\AppData\Local\Cypress\Cache\10.3.1\Cypress
Opening Cypress...
+
after clicking on continue in this screen is when the error appears
Any solution?
Thanks in advance
SOLVED!!!
Solution founded.
I was usisng node v11 and it must be version 14... Sorry
Related
I am running my test using protractor with async/await, and trying to use debugger. Entering in promt node --inspect-brk bin/protractor conf.js
Than open "chrome://inspect/#devices" in Chrome ("bin/protractor file:/// inspect" shows up), clicking "Inspect" and getting following error in promt:
Debugger listening on ws://127.0.0.1:9229/85c1f4a4-3048-4c73-b42f-61a5f078ba7e
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'C:\Users\harmatii\Protractor\calbar\bin\protractor'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
Waiting for the debugger to disconnect...
Looks like the problem in the path for the protractor and conf.js.
Try to provide the correct path to the protractor and conf.js.
Should be something like this:
node --inspect-brk node_modules/protractor/bin/protractor /users/harmatii/Protractor/conf.js
So I am trying to start a discord bot but it won't allow me to acess the start.batch file, it just says this. I am currently learning so I dont exactly what it means
I've ran as administrator, not many things I just need some help
C:\WINDOWS\system32>node bot.js
internal/modules/cjs/loader.js:584
throw err;
^
Error: Cannot find module 'C:\WINDOWS\system32\bot.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
C:\WINDOWS\system32>pause
Press any key to continue . . .`enter code here`
I would just like for my bot to work and for it to start because this is the only thing that will allow me to get my bot online.
Thanks
You should change directory to the root folder where your bot.js is located.
Using macOs High Sierra, trying to run small node.js code node server.js, from iTerm, showing this error:
module.js:545
throw err;
^
Error: Cannot find module '/Users/vikasenkova/server.js'
at Function.Module._resolveFilename (module.js:543:15)
at Function.Module._load (module.js:470:25)
at Function.Module.runMain (module.js:690:10)
at startup (bootstrap_node.js:194:16)
at bootstrap_node.js:666:3
Cant't find solution here.. if somebody knows..Found this link https://gist.github.com/DanHerbert/9520689 when trying to delete files with this: rm -rf /usr/local/lib/node_modules showing that permission denied. Nothing helps.
Check if your running in the same directory as the server.js file. Also update your question with some code to get more specific answer. Hope it helps you.
I am running a Node app on Azure. It's a Web API and when I try to call it, I see this message in the Node console:
Application has thrown an uncaught exception and is terminated:
SyntaxError: Unexpected token (
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:414:25)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (D:\home\site\wwwroot\app.js:17:23)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
I ran my whole code through eslint and didn't find any syntax errors. It also runs fine on my local machine, but doesn't run on Azure.
The message above points to line 17 and column 23 in app.js, which is a require:
let warehouseExport = require('./routes/warehouse-export-api');
I ran eslint and jshint specifically on the file referenced above, and there are no syntax errors.
What are some other ways I can get the exact location of the syntax error, and why could it be that the code fails on Azure but runs on my local machine?
What I tried:
Wrap in try-catch and grab the line number - it shows up undefined:
try {
var warehouseExport = require('./routes/warehouse-export-api');
} catch (error) {
console.log(error + ', line ' + error.lineNumber);
}
You should check version of nodejs you have installed on Azure. Maybe it's <= 4 and it doesn't support let keyword. Just a wild guess.
The cause of the error was that the Node version somehow got reset to 4.2.4.
When I go to Azure Portal and run node --version, I get version 8.1.4.
However, if I console.log the Node version inside my script, it is somehow still 4.2.4.
I will investigate why that happened and how to fix it, but for now it's clear that the bug is due to async function not being recognized by the old Node.
Update: the package.json file where the node version was specified got overwritten somehow, which is what caused the issue.
I developed an angular.js project on codenvy IDE on Javascript framework ( or is it platform). I am unable to preview the same.
I get the following error.
[ERROR] Failed to start application. : ====> /logs/stderr.log <==== node.js:134 throw e; // process.nextTick error, or 'error' event on first tick ^ Error: Cannot find module 'gulp' at Function._resolveFilename (module.js:326:11) at Function._load (module.js:271:25) at require (module.js:355:19) at Object.(/var/vcap.local/dea/apps/app-07zsn86eb8vspvg0-0-bf2638b3e702ededc5473a0c16608d37/app/gulpfile.js:1:74) at Module._compile (module.js:411:26) at Object..js (module.js:417:10) at Module.load (module.js:343:31) at Function._load (module.js:302:12) at Array. (module.js:430:10) at EventEmitter._tickCallback (node.js:126:26)
The console output says it cannot find Gulp, but my project certainly has gulp.js on the root folder. Also the project works perfectly fine when i preview this from a Webstorm editor - so i dont think there is an issue with the code per se..
Any help much appreciated
James
If your project is public, please, share it with Codenvy's factory feature. So everyone will be able to look what is wrong with the project. (You can access factory on left panel of the IDE)