Couldn't find or load main class org.sonar.runner.Main - sonar-runner

I have installed sonar but when I want to analyze a project using sonar runner, I get the following error:
Error: Couldn't find or load main class org.sonar.runner.Main
The directory in which I have installed doesn't contain any spaces, So the possibility of getting this error due to wrong naming is ruled out.
Plz help me.

Related

Next.js: ./node_modules/next/dist/client/dev/amp-dev.js

I have a very serious issue right now trying to use Next js. No matter what version I use, any time I try to run the npm run dev, I get the following error:
error - ./node_modules/next/dist/client/dev/amp-dev.js
Module not found: Can't resolve 'C:\Usersudbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\compiled\regenerator-runtime\runtime.js' in 'C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\client\dev'
error - Error: Cannot find module 'C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\.next\fallback-build-manifest.json'Require stack:
This is literally right after running the create next app command, so I don't install any additional package. One thing realized though is that this error doesn't occur when I use the public folder on my window PC but when I use the user folder called udbasili I get the above error. I have been using next.js for a long time and this is the first I am seeing this error
I had the same issue
the problem was that my project files was in a folder beginning with "ud". My folder name was "udemy".
Renaming that folder or moving the project outside that folder solved the issue
If you compare the paths, there is a missing '\' :
C:\Users**\\**udbasili\Documents\Programming\Acumen Developers\...
C:\Usersudbasili\Documents\Programming\Acumen Developers\...
A quick solution that I gave to this issue was to create the project on a different path. For example:
C:\dev\myportfolio
Please head over to https://nextjs.org/docs/messages/swc-disabled
By disabling swc in next.config.js it will resolve your issue.
You can disable swc by adding:
experimental: {
forceSwcTransforms: true,
}
It's possible your autoimport included '/dist/client/dev' in the 'next/amp' path.
Does it work if you import { useAmp } from 'next/amp'?

error trying to load the config "relay" for the macro imported from "babel-plugin-relay/macro"

We are trying to upgrade our react project to latest packages including relay (7.0.0). Our application builds and works but we are getting this error message in the console (during build) on every file where we import graphql from 'babel-plugin-relay/macro'. We are doing exactly like documented here adding relay
The error is "There was an error trying to load the config "relay" for the macro imported from "babel-plugin-relay/macro. Please see the error thrown for more information." It is coming from \node_modules\babel-plugin-macros\dist\index.js in getConfig( ).
To understand how other projects were configured, I downloaded another sample relay project / installed it and it had the same problem. Interesting enough there was this recent post in that app's issues list error loading config
The solution noted worked for me (adding that noted .babel-plugin-macrosrc.yml file with empty relay plugin?) but I am not understanding why this is needed or what was causing this seemingly benign error message?

CI/CD pipeline deployment of AngularJS1.5.11 to azure websites giving error "Failed to instantiate module app.core due to Unknown provider: ENV_VARS"

after deploying the "AngularJs_1.5.11" app to "azure-websites" using "azure-devops" continuous-integration and deployment gives error:
[$injector:modulerr] Failed to instantiate module app due to:
Error: [$injector:modulerr] Failed to instantiate module app.core due to:
Error: [$injector:unpr] Unknown provider: ENV_VARS
below is the screenshot of the error while accessing the AngularJS azure-website :
also find below screenshot of my build pipeline in azure-devops which deploys AngularJS application build to "azure-websites"
below screenshot is my application code in VSCode
I just started working on this new project which uses AngularJS_1.5.11 so I have no clue what is going wrong. I tried these links
unknown ENV provider in AngularJS from stack but as I am new to AngularJS I have no idea where to apply the changes in my code mentioned in the link.
Any suggestions would be of great help.
Edit:
#Mark if you look at the screenshots below you will come to know how we are setting "ENV_VARS" in the code using "gulp.js, env.config.js, config.json" file
Edit1:
#Mark please find the screenshot of the 'config.js' file which gets created in the gulp task 'ng-config' using source file 'config.json' under "./src/client/app/config.js"
Here are the docs regarding the knowledge relevant to this issue.
Somewhere in your program, it is trying to reference one or more members defined in an angular provider registered as "ENV_VARS". Providers are angularjs objects that are available during compile time (see the table row for "object available in config phase" in this SO answer)
I would search the source of the application to see if this provider was further configured elsewhere (you can search by its name 'ENV_VARS') as it may not be getting sent over with your other source files.
To attempt a quick fix:
On the first line of your app.module.js, change it to this
angular.module('app.config', []).constant("ENV_VARS", {});
This will likely result in another error, but it should pinpoint you to what is trying to access this provider. I'm assuming this is either inherited code or from a purchased template so you may want to investigate the sources to that if possible.

Not able to load Drupal site

I have downloaded a new theme from Themeforest however when loading the site I m getting the below error.
Even developer is confused about the error.
I believe its more of drupal issue can anyone help?
Fatal error: require_once(): Failed opening required 'C:\wamp\www\sites\all\modules\media\file_entity/file_entity.file_api.inc' (include_path='.;c:\wamp\bin\php\php5.4.12\pear') in C:\wamp\www\sites\all\modules\media\file_entity\file_entity.module on line 13
Can you try using relative path like
require_once("./file_entity.file_api.inc");
Before that you need to find out the getcwd() for getting the current working directory.'
then give relative path according to that.
OR
use below,
require_once(DRUPAL_ROOT . '/sites/all/modules/media/file_entity/file_entity.file_api.inc');

CakePHP installation with multiple projects gives `require_once` error on composer

I am trying to run 2 cakephp installations on the same server. However, when I finished setting up the code and the apache vhost settings I ended up getting the following error:
Error: require_once(): Cannot redeclare class composerautoloaderinit922f66fe427c0b7305f553dc8d1952be
File: /var/www/path/app/Vendor/autoload.php
Line: 5
and similarly, on other installation I get:
Error: require_once(): Cannot redeclare class composerautoloaderinit922f66fe427c0b7305f553dc8d1952be
File: /var/www/path_second/app/Vendor/autoload.php
Line: 5
I thought of replacing require_once with just require, but I can't figure out how many includes there will be and what that will do to performance.
I thought of removing one of the folders since apparently its being loaded, but then neither of the two projects I want breaking because at some point for some reason that does not get loaded. Those two projects should be independent.
I wonder if composer should be there at all?!
What should I do?

Resources