How do I fix an error on my terminal when running the command npm start - terminal

I get this error when trying to to run command npm:
juice-shop#9.3.1 start
node app
info: All dependencies in ./package.json are satisfied (OK)
node: symbol lookup error: /home/kali/Downloads/juice-shop_9.3.1/node_modules/libxmljs2/build/Release/xmljs.node: undefined symbol: _ZN2v87Isolate19CheckMemoryPressureEv
My node version: v18.13.0
My npm version: 9.2.0
My OWASP juice shop version: 9.3.1
I am expecting to open the OWASP juice shop in my browser

Related

NativeScript + Apple M1 Error: 'arch install' command failed

NativeScript CLI (8.0.2) on Apple M1 CPU/MBP
When running ns run iOS I get this error.
error
'arch install' command failed.
I've tried running it from Rosetta Terminal & (installing Rosetta 2).
Any ideas?
tns prepare ios --log trace
Installing pods...
Running on arm64 - running pod through rosetta2.
spawn: arch "-x86_64" "pod" "install"
arch: posix_spawnp: pod: Bad CPU type in executable
Result when throw error is false:
{ stdout: '', stderr: '', exitCode: 1 }
'arch install' command failed.
Error: 'arch install' command failed.
at Errors.failWithOptions (/opt/homebrew/lib/node_modules/nativescript/lib/common/errors.js:157:27)
at Errors.fail (/opt/homebrew/lib/node_modules/nativescript/lib/common/errors.js:130:21)
at CocoaPodsService.<anonymous> (/opt/homebrew/lib/node_modules/nativescript/lib/services/cocoapods-service.js:55:30)
at Generator.next (<anonymous>)
at fulfilled (/opt/homebrew/lib/node_modules/nativescript/lib/services/cocoapods-service.js:5:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Have you tried installing an older version of cocoapods?
For me installing 1.10.2 instead of 1.11 fixed the issue for me.

Cannot run appium tests on iOS simulator - Error : Cannot read property 'statBarHeight' of undefined

I set up appium tests following nativescript-dev-appium instructions (https://github.com/NativeScript/nativescript-dev-appium) and tests run fine on an Android simulator.
My problem is on iOS. I cannot make them work, before and after methods fail with the error Cannot read property 'statBarHeight' of undefined. Here are my logs :
➜ npm run e2e -- --runType sim.iPhone11Pro --reuseDevice
> my-project#1.0.0 e2e /Users/fleebzz/workspaces/xxx/my-project
> node ./node_modules/nativescript-dev-appium/check-dev-deps.js && mocha --opts ./e2e/config/mocha.opts "--runType" "sim.iPhone11Pro" "--reuseDevice"
Parsed args: {"port":4723,"projectDir":"/Users/fleebzz/workspaces/xxx/my-project","projectBinary":"/Users/fleebzz/workspaces/xxx/my-project/node_modules/.bin","pluginRoot":"/Users/fleebzz/workspaces/xxx/my-project/node_modules/nativescript-dev-appium","pluginBinary":"/Users/fleebzz/workspaces/xxx/my-project/node_modules/nativescript-dev-appium/node_modules/.bin","wdaLocalPort":8410,"testFolder":"e2e","runType":"sim.iPhone11Pro","appiumCapsLocation":"/Users/fleebzz/workspaces/xxx/my-project/e2e/config/appium.capabilities.json","verbose":false,"cleanApp":false,"path":"/Users/fleebzz/workspaces/xxx/my-project","capabilitiesName":"appium.capabilities.json","driverConfig":{"host":"localhost","port":4723},"logImageTypes":[]}
/Users/fleebzz/workspaces/xxx/my-project/e2e/config/appium.capabilities.json
Capabilities found at: /Users/fleebzz/workspaces/xxx/my-project/e2e/config/appium.capabilities.json
Automation name set to: XCUITest
To change automation name, you need to set it in appium capabilities!
Application full path: /Users/fleebzz/workspaces/xxx/my-project/platforms/ios/build/Debug-iphoneos/myproject.ipa
The started device will be killed after the session quits!
To avoid it, set 'fullReset: false' in appium capabilities.
Is process Simulator.app alive: true
xcrun simctl create "iPhone-11-Pro" "iPhone 11 Pro" "com.apple.CoreSimulator.SimRuntime.iOS-13-5"
Remove: 76B308BE-409C-4A0A-8679-36F670F59118
Check if simulator is booted!
Simulator is booted!
Launched simulator with name: iPhone-11-Pro; udid: 7056B721-AFCA-465F-A65B-E301E21B6DDE; status: booted
Started device: {"token":"7056B721-AFCA-465F-A65B-E301E21B6DDE","name":"iPhone-11-Pro","status":"booted","type":"simulator","apiLevel":"13.5","platform":"ios","createDeviceOptions":{"type":"iPhone-11-Pro"},"pid":75610,"startedAt":1593415466101}
Default device: {
token: '7056B721-AFCA-465F-A65B-E301E21B6DDE',
name: 'iPhone-11-Pro',
status: 'booted',
type: 'simulator',
apiLevel: '13.5',
platform: 'ios',
createDeviceOptions: { type: 'iPhone-11-Pro' },
pid: 75610,
startedAt: 1593415466101
}
Trying to resolve automatically bundleId!
unzip -o /Users/fleebzz/workspaces/xxx/my-project/platforms/ios/build/Debug-iphoneos/myproject.ipa -d /Users/fleebzz/workspaces/xxx/my-project/platforms/ios/build/Debug-iphoneos/myproject
Setting capabilities sim.iPhone11Pro{ "bundleId" : "com.xxx.my-project" }!
Setting application name as my-project
Check and uninstall application from device.
Server args: ["-p","4723","--log-level","info"]
sample scenario
args.appiumCaps['wdaLocalPort']: 8410
Session info:
undefined
Appium settings:
Current version of appium doesn't support appium settings!
Could not resolve device density. Please provide offset in appium config
Appium driver has started successfully!
1) "before all" hook
2) "after all" hook
Killing simulator with udid 7056B721-AFCA-465F-A65B-E301E21B6DDE
Executing "/bin/ps aux | grep -ie '7056B721-AFCA-465F-A65B-E301E21B6DDE' | grep -v grep | xargs kill -9"
No matching processes to kill!
Stopping server...
Shut down!!!
About to exit with code: exit
unzip -o /Users/fleebzz/workspaces/xxx/my-project/platforms/ios/build/Debug-iphoneos/myproject.ipa -d /Users/fleebzz/workspaces/xxx/my-project/platforms/ios/build/Debug-iphoneos/myproject
Appium terminated due signal: null and code: 1
unzip -o /Users/fleebzz/workspaces/xxx/my-project/platforms/ios/build/Debug-iphoneos/myproject.ipa -d /Users/fleebzz/workspaces/xxx/my-project/platforms/ios/build/Debug-iphoneos/myproject
Application from device is uninstalled.
Application from device is uninstalled.
Exited from appium
0 passing (1m)
2 failing
1) sample scenario
"before all" hook:
TypeError: Cannot read property 'statBarHeight' of undefined
at Function.<anonymous> (node_modules/nativescript-dev-appium/lib/appium-driver.js:260:37)
at Generator.next (<anonymous>)
at fulfilled (node_modules/nativescript-dev-appium/lib/appium-driver.js:4:58)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
2) sample scenario
"after all" hook:
TypeError: Cannot read property 'quit' of undefined
at Context.<anonymous> (e2e/sample.e2e-spec.js:14:22)
at processImmediate (internal/timers.js:456:21)
at process.topLevelDomainCallback (domain.js:137:15)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! my-project#1.0.0 e2e: `node ./node_modules/nativescript-dev-appium/check-dev-deps.js && mocha --opts ./e2e/config/mocha.opts "--runType" "sim.iPhone11Pro" "--reuseDevice"`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the my-project#1.0.0 e2e script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/fleebzz/.npm/_logs/2020-06-29T07_24_52_063Z-debug.log
I tried to switch to an older version of iOS (12.X instead of 13.X)
I tried with an older version of appium and of nativescript-dev-appium
I tried with another iPhone version (iPhone X) instead of iPhone 11 Pro
Does anybody already have this issue or have any clue about how to resolve this ?

during first cypress run getting error spawn EPERM on Windows

C:\Users\rXXXX\automationlearning\node_modules.bin>cypress open
It looks like this is your first time using Cypress: 3.4.1
× Verifying Cypress can run C:\Users\rXXXXX\AppData\Local\Cypress\Cache\3.4.1\Cypress
→ Cypress Version: 3.4.1
Cypress failed to start.
This is usually caused by a missing library or dependency.
The error below should indicate which dependency is missing.
https://on.cypress.io/required-dependencies
If you are using Docker, we provide containers with all required dependencies installed.
spawn EPERM
Platform: win32 (10.0.17134)
Cypress Version: 3.4.1
I expect UE should be opened

Cannot run addon after installation of web-ext on ubuntu 16.04 nodejs v4.2.6 npm 3.5.2

when installing web-ext i got this two messages in the and of installation:
npm WARN optional Skipping failed optional dependency /web-ext/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.2.4
after trying to start addon with web-ext run i get this messages
TypeError: Cannot read property 'R_OK' of undefined
at fileIsReadable (/usr/local/lib/node_modules/web-ext/dist/webpack:/src/util/file-exists.js:24:42)
at _callee$ (/usr/local/lib/node_modules/web-ext/dist/webpack:/src/util/file-exists.js:28:11)
at tryCatch (/usr/local/lib/node_modules/web-ext/node_modules/regenerator-runtime/runtime.js:62:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/web-ext/node_modules/regenerator-runtime/runtime.js:296:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next]
(/usr/local/lib/node_modules/web-ext/node_modules/regenerator-runtime/runtime.js:114:21)
at step (/usr/local/lib/node_modules/web-ext/dist/webpack:/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:1)
at /usr/local/lib/node_modules/web-ext/dist/webpack:/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:1
at new Promise (/usr/local/lib/node_modules/web-ext/dist/webpack:/node_modules/core-js/library/modules/es6.promise.js:177:1)
at /usr/local/lib/node_modules/web-ext/dist/webpack:/node_modules/babel-runtime/helpers/asyncToGenerator.js:14:1
at fileExists (/usr/local/lib/node_modules/web-ext/dist/web-ext.js:13002:17)
Update to at least the latest v6 of node. I recommend you to use >= v8, because the support for v6 is ending in 2019 and you can't use async/await for example. (https://github.com/nodejs/Release#release-schedule)

Getting ENAMETOOLONG

Getting the following message when trying to build for android
Processing node_modules failed. Error: spawn ENAMETOOLONG
nativescript 2.4 and android 2.4.1 - all updated.
npm version 3.10.8
node 6.9.1
also using SCSS
I googled and looks like it has to do with windows command line limit.

Resources