angularjs gulp build fail angular not defined - angularjs

Hi i'm building an app with gulp build command after a few seconds shows an error "angular is no defined" and several error more, this is the log :
{lamb} gulp build
[23:45:11] Requiring external module babel-register
[23:45:13] Using gulpfile C:\Apps\test\gulpfile.babel.js
[23:45:13] Starting 'lint'...
[23:45:14] Starting 'styles'...
[23:45:15] Starting 'scripts'...
[23:45:15] Starting 'images'...
[23:45:16] Starting 'fonts'...
[23:45:16] Starting 'extras'...
[23:45:16] Finished 'images' after 923 ms
[23:45:16] Finished 'fonts' after 90 ms
[23:45:16]
C:\Apps\test\app\scripts\main.js
3:10 error "angular" is not defined no-undef
5:34 error A space is required after ',' comma-spacing
9:12 error Extra space after key "controller" key-spacing
10:11 error Trailing spaces not allowed no-trailing-spaces
12:11 error Extra space after key "templateUrl" key-spacing
13:12 error Extra space after key "controller" key-spacing
16:10 error Extra space after key "templateUrl" key-spacing
17:12 error Extra space after key "controller" key-spacing
C:\Apps\test\app\scripts\controllers\controllerView.js
2:1 error "angular" is not defined no-undef
✖ 9 problems (9 errors, 0 warnings)
[23:45:16] 'lint' errored after 3.17 s
[23:45:16] ESLintError in plugin 'gulp-eslint'
Message:
Failed with 9 errors
[23:45:16] Finished 'styles' after 2.07 s
[23:45:16] Finished 'extras' after 609 ms
[23:45:16] Finished 'scripts' after 1.53 s

Add this to your .eslintrc file:
{
"globals": {
"angular": true
},
// ...
}
See the accepted answer for this question for more information:
ESLint's "no-undef" rule is calling my use of Underscore an undefined variable

Related

How could I resolve a non-working Eclipse indexer?

My Eclipse C indexer does not work, in the .metadata/.log file it writes an entry:
!ENTRY org.eclipse.cdt.core 1 0 2022-10-24 16:46:02.674
!MESSAGE Indexed 'eio_valto' (0 sources, 0 headers) in 0,008 sec: 0 declarations; 0 references; 0 unresolved inclusions; 0 syntax errors; 0 unresolved names (0%)
In the indexer settings "Index source and header files opened in editor" is ticked, so it should find at least one file, which is opened in my editor.
How could I resolve this?
This is a C project, which I created with File --> New --> C/C++ Project, and I use and external Makefile to build. It is the same as in all my other project, but the others work fine, only this does not.
Thanks in advance!
The entire log:
!SESSION 2022-10-24 16:16:41.372 -----------------------------------------------
eclipse.buildId=4.7.3.M20180330-0640
java.version=1.8.0_172
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=hu_HU
Framework arguments: -product org.eclipse.epp.package.cpp.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.cpp.product
!ENTRY org.eclipse.jface 2 0 2022-10-24 16:16:51.319
!MESSAGE Keybinding conflicts occurred. They may interfere with normal accelerator operation.
!SUBENTRY 1 org.eclipse.jface 2 0 2022-10-24 16:16:51.319
!MESSAGE A conflict occurred for ALT+CTRL+T:
Binding(ALT+CTRL+T,
ParameterizedCommand(Command(org.eclipse.search.ui.performTextSearchWorkspace,Find Text in Workspace,
Searches the files in the workspace for specific text.,
Category(org.eclipse.search.ui.category.search,Search,Search command category,true),
org.eclipse.ui.internal.WorkbenchHandlerServiceHandler#407b41e6,
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.window,hu,,system)
Binding(ALT+CTRL+T,
ParameterizedCommand(Command(org.eclipse.tm.terminal.connector.local.command.launch,Open Local Terminal on Selection,
,
Category(org.eclipse.tm.terminal.view.ui.commands.category,Terminal Commands,null,true),
org.eclipse.ui.internal.WorkbenchHandlerServiceHandler#3291d9c2,
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.window,,,system)
!ENTRY org.eclipse.egit.ui 2 0 2022-10-24 16:17:03.170
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
user global configuration and to define the default location to store repositories: 'C:\Users\mester.adam'. If this is
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
EGit might behave differently since they see different configuration options.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
!ENTRY org.eclipse.epp.logging.aeri.ide 2 17 2022-10-24 16:17:07.658
!MESSAGE Server ‘org.eclipse.epp.logging.aeri.ide.server’ failed with exception: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $. ; version: 2.0.7.v20170906-1327
!STACK 0
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224)
at com.google.gson.Gson.fromJson(Gson.java:887)
at com.google.gson.Gson.fromJson(Gson.java:852)
at com.google.gson.Gson.fromJson(Gson.java:801)
at org.eclipse.epp.internal.logging.aeri.ide.server.json.Json.deserialize(Json.java:91)
at org.eclipse.epp.internal.logging.aeri.ide.server.mars.IO.refreshConfiguration(IO.java:66)
at org.eclipse.epp.internal.logging.aeri.ide.server.mars.ServerConnection.startUp(ServerConnection.java:124)
at com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:62)
at com.google.common.util.concurrent.Callables$4.run(Callables.java:122)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:213)
... 9 more
!ENTRY org.eclipse.launchbar.core 2 0 2022-10-24 16:17:08.381
!MESSAGE Enablement expression is missing for descriptor type org.eclipse.cdt.debug.core.coreBuildDescriptorType
!ENTRY org.eclipse.launchbar.core 2 0 2022-10-24 16:17:08.399
!MESSAGE Enablement expression is missing for config provider for org.eclipse.cdt.debug.core.coreBuildDescriptorType
!ENTRY org.eclipse.launchbar.core 2 0 2022-10-24 16:17:08.413
!MESSAGE Enablement expression is missing for config provider for org.eclipse.cdt.debug.core.coreBuildDescriptorType
!ENTRY org.eclipse.cdt.core 1 0 2022-10-24 16:19:33.058
!MESSAGE Indexed 'eio_valto' (0 sources, 0 headers) in 0,145 sec: 0 declarations; 0 references; 0 unresolved inclusions; 0 syntax errors; 0 unresolved names (0%)
!ENTRY org.eclipse.cdt.core 1 0 2022-10-24 16:37:01.920
!MESSAGE Indexed 'eio_valto' (0 sources, 0 headers) in 0,127 sec: 0 declarations; 0 references; 0 unresolved inclusions; 0 syntax errors; 0 unresolved names (0%)
!ENTRY org.eclipse.cdt.core 1 0 2022-10-24 16:37:53.391
!MESSAGE Indexed 'eio_valto' (0 sources, 0 headers) in 0,103 sec: 0 declarations; 0 references; 0 unresolved inclusions; 0 syntax errors; 0 unresolved names (0%)
I have tried the followings:
rebuild index
close and reopen project, and then rebuild index
refresh project, and then rebuild index
delete the project and reimport it into the workspace
None of them helped.
Finally: I have deleted the project and created a new project with my files, but I had to create and re-configure all my build configurations. Now it works fine, the indexer too, but it is strange, because the workspace settings are the same, and I have set the project settings to the same too. So I don't accept my method as a solution, it is just a workaround. But now, I can't reproduce the issue, so I really don't know, how to find the proper solution for this problem.

Cakephp 3.x => 4.0 migration: Fatal error in PHPStan\Analyser\MutatingScope

When I run the rector script bin/cake upgrade rector --rules cakephp40 ../project/src I get the following error:
Notice: Undefined property: PhpParser\Node\Stmt\ClassMethod::$attrGroups in phar:///Users/uscreen/Sites/upgrade/vendor/phpstan/phpstan/phpstan.phar/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php on line 216
Warning: Invalid argument supplied for foreach() in phar:///Users/uscreen/Sites/upgrade/vendor/phpstan/phpstan/phpstan.phar/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php on line 216
Fatal error: PHPStan\Analyser\MutatingScope cannot implement PHPStan\Analyser\Scope - it is not an interface in phar:///Users/uscreen/Sites/upgrade/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/MutatingScope.php on line 92
The script then exits with no changes made, but it echos Rector applied successfully. I don`t know where to start to debug this.

when generating build of AngularJS project getting Uglifying source .tmp/concat/scripts/scripts.js failed

Creating build of angularjs project inside folder dist /script I am not getting one script.js file.
I have tried grunt build --prod --force command for creating the build
Running "uglify:generated" (uglify) task
JS_Parse_Error {enter code here
message: 'Unexpected token: punc ())',
filename: '../../.tmp/concat/scripts/scripts.js',
line: 5122,
col: 59,
pos: 161138,
stack:
'Error\n at new JS_Parse_Error (D:\\...node_modules\\uglify-node_modules\\uglify-js\\lib\\parse.js:1427:20)' }
>> Uglifying source .tmp/concat/scripts/scripts.js failed.
Warning: Uglification failed.
Unexpected token: punc ()).
Line 5122 in .tmp/concat/scripts/scripts.jsenter code here
Used --force, continuing.
Warning: Cannot read property min of undefined Used --enter code hereforce, continuing.

FosUserBundle + Symfony 3.4

Since 7 days I tried to repair HwiOauthFukingBundle with facebook + FosUserOtherFukingBundle + Symfony 3.4.
And now, I have this incomprehensible errors in prod but not in dev.
[2018-03-17 14:45:27] php.WARNING: Warning:
require(/var/www/vhosts/domaine.fr/var/cache/prod/doctrine/orm/Proxies/__CG__ECUserBundleEntityImage.php):
failed to open stream: No such file or directory
{"exception":"[object] (ErrorException(code: 0): Warning:
require(/var/www/vhosts/domaine.fr/var/cache/prod/doctrine/orm/Proxies/__CG__ECUserBundleEntityImage.php):
failed to open stream: No such file or directory at
/var/www/vhosts/domaine.fr/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php:223)"}
[]
And this one
[2018-03-17 14:45:27] request.CRITICAL: Uncaught PHP Exception
Symfony\Component\Debug\Exception\FatalErrorException: "Compile Error:
require(): Failed opening required
'/var/www/vhosts/domaine.fr/var/cache/prod/doctrine/orm/Proxies/__CG__ECUserBundleEntityImage.php'
(include_path='.:/opt/plesk/php/7.1/share/pear')" at
/var/www/vhosts/domaine.fr/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php
line 223 {"exception":"[object]
(Symfony\Component\Debug\Exception\FatalErrorException(code: 0):
Compile Error: require(): Failed opening required
'/var/www/vhosts/domaine.fr/var/cache/prod/doctrine/orm/Proxies/__CG__ECUserBundleEntityImage.php'
(include_path='.:/opt/plesk/php/7.1/share/pear') at
/var/www/vhosts/domaine.fr/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php:223)"}
[]
What's going on ?
I have clean the cache folder etc. but this error seems to be falling from the sky... this is a nightmare...

bitbake fails on "bitbake nano"

I am trying to setup bitbake and openembedded in order to cross-compile code for angstrom 2009.x on devkit8000 (a beagleboard's clone). I have followed this page but when I try
$ bitbake nano
I get
Loading cache: 100% |##############################################################################################################################################################################################| Time: 00:00:00
Loaded 1 entries from dependency cache.
ERROR: Error parsing /home/hnsl/stuff/openembedded/recipes/images/initramfs-kexecboot-image.bb: Could not inherit file classes/rootfs_${IMAGE_PKGTYPE}.bbclass | ETA: --:--:--
ERROR: Command execution failed: Exited with 1
Apparently it seems that I need to change version of Angstrom. Using
"DISTRO="angstrom-2010.x"
on stuff/build/conf/local.conf resolves this issue.

Resources