Can't run demo site in Cloud9 - cloud9-ide

I'm trying to start using cloud9. I created the following html file:
<html>
<body>
<h1>Hello</h1>
</body>
</html>
When I try to run, I get
ReferenceError: document is not defined
at Object.<anonymous> (/home/ubuntu/workspace/html/js/site.js:1:63)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain [as _onTimeout] (module.js:497:10)
at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)

It looks like you are running site.js in Node.js instead of your html file in apache.

Related

yarn begin error Command failed with exit code 1

Tried to use yarn begin, but errors keep showing up
PS C:\Users\obi besong\Desktop\appC> yarn begin
yarn run v1.22.17
$ react-scripts start
C:\Users\obi besong\Desktop\appC\node_modules\queue-microtask\index.js:5
? queueMicrotask.bind(globalThis)
^
ReferenceError: globalThis is not defined
at Object.<anonymous> (C:\Users\Salathiel Ojage\Desktop\contestMungwin\node_modules\queue-microtask\index.js:5:25)
at Module._compile (internal/modules/cjs/loader.js:805:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:816:10)
at Module.load (internal/modules/cjs/loader.js:672:32)
at tryModuleLoad (internal/modules/cjs/loader.js:612:12)
at Function.Module._load (internal/modules/cjs/loader.js:604:3)
at Module.require (internal/modules/cjs/loader.js:711:19)
at require (internal/modules/cjs/helpers.js:14:16)
at Object.<anonymous> (C:\Users\Salathiel Ojage\Desktop\contestMungwin\node_modules\run-parallel\index.js:4:24)
at Module._compile (internal/modules/cjs/loader.js:805:30)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.```

Why can't my Mac run a server on port 1000?

I'm trying to run a server with Express.js and each time I try to run it on port 1000 I get the following message:
events.js:292
throw er; // Unhandled 'error' event
^
Error: listen EACCES: permission denied 0.0.0.0:1000
at Server.setupListenHandle [as _listen2] (net.js:1301:21)
at listenInCluster (net.js:1366:12)
at Server.listen (net.js:1452:7)
at Function.listen (/Users/orensayag/Documents/johnBryce/26 - 210421/hw/node_modules/express/lib/application.js:618:24)
at Object.<anonymous> (/Users/orensayag/Documents/johnBryce/26 - 210421/hw/index.js:6:5)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
Emitted 'error' event on Server instance at:
at emitErrorNT (net.js:1345:8)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
code: 'EACCES',
errno: -13,
syscall: 'listen',
address: '0.0.0.0',
port: 1000
}
I've also heard that Macs have a problem with running on this port, and that in Windows it runs as expected.
Why can't my Mac run a server on port 1000?
For ports lower than 1024 you need to be root. You are getting access denied because the user starting the process does not have a root access.

mouseMove not working in firefox; giving http method not allowed

mouseMove is not working in firefox with the latest versions of Firefox, geckodriver, and protractor. Same code works fine for chrome 77.
I have the following environment:
Node: v10.16.3
Protractor: 5.4.2
Geckodriver: v0.25.0
firefox: 69.0.1 (64-bit)
browser.actions().mouseMove(element(by.xpath('//app-admin-panel/div/div/div/div[2]/table/tbody/tr/td[1]'))).perform();
This code snippet should hover over the specified element, but it throws the following error:
Message:
Failed: HTTP method not allowed
Stack:
WebDriverError: HTTP method not allowed
at parseHttpResponse (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:536:11)
at doSend.then.response (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:441:30)
at process._tickCallback (internal/process/next_tick.js:68:7)
From: Task: mouseMove
at Driver.schedule (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:807:17)
at actions.map.action (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\actions.js:124:23)
at Array.map (<anonymous>)
at C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\actions.js:123:29
at TaskQueue.execute_ (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3084:14)
at TaskQueue.executeNext_ (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3067:27)
at asyncRun (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2927:27)
at C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:668:7
at process._tickCallback (internal/process/next_tick.js:68:7)
From: Task: ActionSequence.perform
at ActionSequence.perform (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\actions.js:122:33)
at UserContext.<anonymous> (E:\Office\Protractor\Wallboard\Smoketest.js:39:207)
at C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:112:25
at new ManagedPromise (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1077:7)
at ControlFlow.promise (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2505:12)
at schedulerExecute (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:95:18)
at TaskQueue.execute_ (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3084:14)
at TaskQueue.executeNext_ (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3067:27)
at asyncRun (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2974:25)
at C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:668:7
From: Task: Run it("Make a Copy of Dashboard") in control flow
at UserContext.<anonymous> (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:94:19)
From asynchronous test:
Error
at Suite.<anonymous> (E:\Office\Protractor\Wallboard\Smoketest.js:38:5)
at Object.<anonymous> (E:\Office\Protractor\Wallboard\Smoketest.js:2:1)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
4 specs, 1 failure
Finished in 21.836 seconds
[11:41:20] I/launcher - 0 instance(s) of WebDriver still running
[11:41:20] I/launcher - firefox #01 failed 1 test(s)
[11:41:20] I/launcher - overall: 1 failed spec(s)
[11:41:20] E/launcher - Process exited with error code 1
It's a known issue (not sure if they fixed it yet) for FF.
I suggest you to use this https://www.npmjs.com/package/protractor-firefox-support
solved by updating direct connect value to false in protractor config
in case of chrome set it to true for local testing
directConnect: false

Cannot find module Youch in AdonisJS Heroku

After doing the deploy of my AdonisJS application on Heroku. An error is encountered while trying to access the application via browser.
I'm using AdonisJS version 4.1.
Error: Cannot find module 'Youch'
Error: Cannot find module 'Youch'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:655:15)
at Function.Module._load (internal/modules/cjs/loader.js:580:25)
at Module.require (internal/modules/cjs/loader.js:711:19)
at require (internal/modules/cjs/helpers.js:14:16)
at requireStack (/app/node_modules/require-stack/src/index.js:44:12)
at Ioc._require (/app/node_modules/#adonisjs/fold/src/Ioc/index.js:345:12)
at Ioc.use (/app/node_modules/#adonisjs/fold/src/Ioc/index.js:742:17)
at Object.<anonymous> (/app/app/Exceptions/Handler.js:6:15)
at Module._compile (internal/modules/cjs/loader.js:805:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:816:10)
at Module.load (internal/modules/cjs/loader.js:672:32)
at tryModuleLoad (internal/modules/cjs/loader.js:612:12)
at Function.Module._load (internal/modules/cjs/loader.js:604:3)
at Module.require (internal/modules/cjs/loader.js:711:19)
at require (internal/modules/cjs/helpers.js:14:16)
at requireStack (/app/node_modules/require-stack/src/index.js:44:12)
at Ioc._resolveAutoloadedPath (/app/node_modules/#adonisjs/fold/src/Ioc/index.js:265:20)
at Ioc.use (/app/node_modules/#adonisjs/fold/src/Ioc/index.js:739:19)
at Server._handleException (/app/node_modules/#adonisjs/framework/src/Server/index.js:245:36)
at _executeServerMiddleware.then.then.catch (/app/node_modules/#adonisjs/framework/src/Server/index.js:441:14)
at processTicksAndRejections (internal/process/task_queues.js:86:5)
I want to make that mistake, but I do not know how.
try const Youch = use(‘youch’) instead const Youch = use(‘Youch’).

Error creating a React Native project - SyntaxError: Unexpected token import

In trying to create a project with native Code, my Windows command prompt always shows me the error message below at the end of the creation which makes the React Native project folder is not complete and I can not so do not launch the application from my Android emulator. Does anyone have a solution to solve this problem? Thank you in advance (Sorry if my English is bad, I speak French).
Console text: https://pastecode.xyz/view/23e2e986
C:\Users\Quentin SAVEAN\Desktop\ApiApp\node_modules\react-native\local-cli\cliEntry.js:30
import type {CommandT} from './commands';
SyntaxError: Unexpected token import
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Module._compile (C:\Users\Quentin SAVEAN\Desktop\ApiApp\node_modules\pirates\lib\index.js:91:24)
at Module._extensions..js (module.js:663:10)
at Object.newLoader [as .js] (C:\Users\Quentin SAVEAN\Desktop\ApiApp\node_modules\pirates\lib\index.js:96:7)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
Regards,
Quentin S.

Resources