Gulp watch shows a lot of eslint errors. Which dependencies are missing? - ionic-framework

I made a git clone app Ionic 1 made with Generator-M-Ionic
I've done the following steps to install the dependencies:
npm install
bower install
npm install --global gulp-cli
And the prerequisites of the generator itself:
npm i -g yo gulp bower
npm i -g generator-m-ionic
After that the command
gulp watch
The terminal performs normal
[13:58:09] Starting 'jsonlint'...
[13:58:10] Finished 'watch' after 191 ms
[Browsersync] Access URLs:
----------------------------------------
Local: http://localhost:3000
External: http://192.168.100.235:3000
----------------------------------------
UI: http://localhost:3001
UI External: http://192.168.100.235:3001
----------------------------------------
[Browsersync] Serving files from: app
[Browsersync] Serving files from: .tmp
[13:58:10] Finished 'jsonlint' after 488 ms
But several errors like this below appear later in the terminal and my browser only opens an empty screen.
app/main/controllers/logoutCtrl.js
2:1 error "SocialWaveApp" is not defined no-undef
3:3 warning Unexpected console statement no-console
4:3 error "mixpanel" is not defined no-undef
8:9 error "hideSheet" is defined but never used no-unused-vars
13:32 error "index" is defined but never used no-unused-vars
17:9 error "mixpanel" is not defined no-undef
22:9 warning Unexpected console statement no-console
30:11 error "facebookConnectPlugin" is not defined no-undef
34:13 warning Unexpected console statement no-console
How to find out what are the dependencies and what is missing?

The problem was with some dependencies like fserve which only runs on Mac, so the solution was move to a macbook, now the app work.
The eslint errors only show that my project is not using the JS guide lines.

Related

Building package glib:x64-osx failed with: BUILD_FAILED

I am trying to install GTK on my Mac (running Catalina) using vcpkg.
I get the following error message on running ./vcpkg install gtk
How can I fix this?
Error: Building package glib:x64-osx failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with .\vcpkg update, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: glib:x64-osx
Vcpkg version: 2019.09.12-unknownhash
Additionally, attach any relevant sections from the log files above.
EDIT
I used --keep-going while running the install command, and it installed all the packages that do not require glib to build.
I've added the log file outputs:
config-x64-osx-dbg-out.log
config-x64-osx-dbg-err.log
CMakeOutput.log

Protractor Process exited with error code 100

I'm trying to setup protractor on different computer. It is using the same files with my other computer (cannot be used because hdisc corrupted).
It run fine on my other computer but I am getting error "Process exited with error code 100" when I tried to run protractor on this one.
I've tried to delete the node modules, clean cache and perform npm install again to install the dependencies. It helps my earlier issue (cannot run webdriver) but is now causing me this one.
[14:44:09] I/launcher - Running 1 instances of WebDriver
[14:44:09] I/local - Starting selenium standalone server...
[14:44:11] E/launcher - Error: Error: Server terminated early with status 1
at earlyTermination.catch.e (C:\Users\PMO\Documents\DG\Jasmine\node_modules\selenium-webdriver\remote\index.js:252:52)
at process._tickCallback (internal/process/next_tick.js:68:7)
[14:44:11] E/launcher - Process exited with error code 100
npm ERR! code ELIFECYCLE
npm ERR! errno 100
npm ERR! ProtractorTutorial# protractor: `protractor conf.js`
npm ERR! Exit status 100
npm ERR!
npm ERR! Failed at the protractor# protractor script.
My current chrome version is: 74.0.3729.131
Webdriver version: chromedriver_74.0.3729.6.exe
OS: Windows 10.
Please advise me on how to fix this issue. Or is there any specific version of chrome and webdriver that can work?
use directConnect=true in your config. if you are already using that, The problem is with the webdriver.
Try running below commands from your project location
webdriver-manager clean
node node_modules/protractor/bin/webdriver-manager update --standalone --versions.standalone=3.8.0
I encountered a similar issue yesterday and inspired by Madhan's solution I worked it out.
I'm learning angularJS thru the official tutorial. I found protractor is actually a standalone tool (I'm a newbie in front-end development), which means it can be run separately.
So following the official setup guide, I run
protractor e2e-tests/protractor.conf.js
and found below feedback:
E/launcher - SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 77
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'xxx', ip: 'xxx', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '11.0.2'
Driver info: driver.version: unknown
remote stacktrace: 0 chromedriver_77.0.3865.40 0x00000001078b7f09 chromedriver_77.0.3865.40 + 3694345
And my chrome version was 76 in the moment.
So after I upgraded chrome to 77, it worked.
Tips:
if use directConnect=true in your config still doesn't work, try to run in standalone mode, which can provide you more useful feedback.
For me, the issue was a space after Scenario in the feature file
Wrong Scenario :
Corrected to Scenario: and the feature started executing
Cant see this answer above, so this might help someone
Your problem might be that you need to run your tests without sudo!
Sometimes if you get an EACCESS error, you can then change directory permissions so that you can run it without sudo.
My issue here was an outdated version of webdriver-manager. This fix only partially fixes the issue because it does not update the npm package. To completely fix this you need to ensure your package.json is configured with the correct webdriver-manager version (npm install webdriver-manager#latest --save-dev). Then you'll need to run:
npm install
node ./node_modules/protractor/bin/webdriver-manager clean
node ./node_modules/protractor/bin/webdriver-manager update
You may also need to run a npm dedupe to ensure all items are using the new package
In my case I had to run update + start
node node_modules/protractor/bin/webdriver-manager update --standalone --versions.standalone=3.8.0
node node_modules/protractor/bin/webdriver-manager start --standalone --versions.standalone=3.8.0
thank you 🤘🏻
For me it was a missing tsconfig.json file in my e2e folder. If you don't have one in your e2e folder, simply create one and put this code into it. Then run ng e2e again.
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}
I'm using:
Angular CLI: 9.0.7
Node: 14.16.0
Chrome: 89.0.4389.82
chromedriver_89.0.4389.23

Unable to debug React Native using VSCode

Fresh init of a RN project with a fresh copy of React Native Full Pack in VSCode. I'm unable to get this new project to debug, but am able to get other projects to debug using the same methods. I've tried recreating the project and still no dice. I can use react-native run-android in a command prompt to get it to debug, but not VSCode. I keep getting this error:
events.js:167
throw er; // Unhandled 'error' event
^
Error: EPERM: operation not permitted, lstat 'c:\Users\user\Documents\repos\app\android\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\android\support\asynclayoutinflater'
Emitted 'error' event at:
at NodeWatcher.<anonymous> (c:\Users\user\Documents\repos\app\node_modules\metro\node_modules\sane\src\node_watcher.js:291:16)
at c:\Users\user\Documents\repos\app\node_modules\graceful-fs\polyfills.js:282:31
at FSReqWrap.oncomplete (fs.js:158:21)
[Error] Error: Error while executing command 'react-native.cmd run-android --no-packager': Error while executing command 'react-native.cmd run-android --no-packager' (error code 101)
I've also tried running the packager first, but it still default to a --no-packager run.
Deleting and reinstall NPM packages seems to work some of the time. But a better way to fix this problem is to run gradlew.bat clean from inside the android folder of the RN directory, then rerun the packager and restart the app.
install NodeWatcher.
use this command in windows : npm install node-watch
also try this.
You can also clean your build cache and gradle cache.
For more detail about how to do it, check this article: How to clear gradle cache

IBM Cloud Node-RED Manage Palette doesn't install items

I'm on IBM Cloud trying to install node-red-node-smooth from the manage palette, and I'm getting an error. I've tried several other packages as well. The error that I get in my debug log shows:
npm WARN saveError ENOENT: no such file or directory, open '/home/vcap/app/.node-red/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/vcap/app/.node-red/package.json'
npm WARN .node-red No description
npm WARN .node-red No repository field.
npm WARN .node-red No README data
npm WARN .node-red No license field.
+ node-red-node-smooth#0.1.0
updated 1 package in 4.726s
npm ERR! Object.entries is not a function
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vcap/app/.npm/_logs/2018-05-10T15_01_53_296Z-debug.log
The log file has a stack trace that starts with this:
106 verbose stack TypeError: Object.entries is not a function
Is there something obvious that I'm doing wrong?
instances deployed in the last few days got npm 6.0.0. This version of npm contained a bug that caused the Object.entries is not a function error.
npm released 6.0.1 that fixed this issue today (Thursday May 10th 2018)
You have three possible ways to fix your instance:
deploy a new instance and copy your flows over
or, set the NPM_CONFIG_AUDIT environment variable* to false - which stops npm 6.0.0 going down the code path containing the bug.
or, set the NODE_MODULE_CACHE environment variable* to false and trigger a restage of your application - that will get npm 6.0.1 installed.
If you don't have much in the way of flows at this point, deleting and creating a new instance is the easiest option.
If you want to 'repair' your existing instance, option 2 is probably the easiest as it just requires an automatic restart of the app, rather than a restage which requires the cf command-line tool to trigger manually.
To set an environment variable within your IBM Cloud application, go to your application's dashboard page. Go to the Runtime section in the left-hand navigation. Select 'Environment Variables' in the tabs across the top and scroll down to the 'User defined' section of the page. Click 'Add' - enter the env var details and click 'Save'. Your app will be restarted with the variable set.

ionic 2 error when start new project

E:\SocialLoginDemo>ionic start HelloWorld12 blank --v2
Creating Ionic app in folder E:\SocialLoginDemo\HelloWorld12 based on blank project
Installing npm packages...
Error with start undefined
Error Initializing app: There was an error with the spawned command: npminstall
There was an error with the spawned command: npminstall
Caught exception:
undefined
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
my version information
Your system information:
You have been opted out of telemetry. To change this, run: cordova
telemetry on.
6.3.1
Ionic CLI Version:2.1.0
Ionic App Lib Version: 2.1.0-beta.1
OS: Node Version:v4.6.0
There was some problem in spawned command "npminstall" but now they have fixed this issue. Mostly it should work now and if not kindly share screenshot of errors being thrown.