ng serve command suddenly stopped working - visual-studio-code

I've got this angular (12.2.12) app. Everything was working fine until today. When i tried ng serve --live-reload=false the process just failed. Browser application bundle generation completed successfully but right after that i've got this error message:
× 「wdm」: Error: invalid argument
at pathToArray (app_path\node_modules\memory-fs\lib\MemoryFileSystem.js:44:10)
at MemoryFileSystem.readdirSync (app_path\node_modules\memory-fs\lib\MemoryFileSystem.js:122:13)
at MemoryFileSystem.<computed> [as readdir] (app_path\node_modules\memory-fs\lib\MemoryFileSystem.js:279:34)
at app_path\node_modules\webpack\lib\CleanPlugin.js:65:7
at symbolIterator (app_path\node_modules\neo-async\async.js:3482:9)
at timesSync (app_path\node_modules\neo-async\async.js:2297:7)
at Object.eachLimit (app_path\node_modules\neo-async\async.js:3463:5)
at getDiffToFs (app_path\node_modules\webpack\lib\CleanPlugin.js:61:11)
at app_path\node_modules\webpack\lib\CleanPlugin.js:352:6
at Hook.eval [as callAsync] (eval at create (app_path\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:12:1)
I didn't change anything beisdes changing value for build / outputPath in angular.json (changing it back to previous value did not help to solve the problem). Any ideas what may be the problem?
One more thing: ng build works without any problems

Ok i apologize even tho i said i changed the outputPath back to it's previous value the opposite was true and i did not save the angular.json after changing it back.
Changing the value back and saving angular.json did actually resolve the issue. The problem happened because i changed the value of outputPath to shared network folder. This change caused ng serve to stop working.
(Not sure wheather to delete the question or keep it up with this answer)

Related

Undefined method [] for nil when trying to run cap deploy:restart

I have a Rails 5.2 app, and with cap 3.4.1 we are suddenly getting this weird error:
[b35efe76] Phusion Passenger(R) 6.0.8
DEBUG [b35efe76] Finished in 0.305 seconds with exit status 0 (successful).
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy#host.com: undefined method `[]' for nil:NilClass
Trying to narrow it down, it happens when attempting to restart, because this is the line that fails:
cap production deploy:restart
The question is, how do I go about finding what file is trying to call [] on a nil value on? Running cap with --trace is of no value because it just gives me internal errors - nothing in my code. Basically, how do I find out what is nil?
One more clue, currently, I have a bunch of servers, if I run the cap restart command on server A, it restarts fine, on server B, it throws this error, so I'm guessing there's an environment variable on server A but not B, but the error is just so opaque I don't know where to begin.
Thanks for any help,
kevin
A wild guess: I had a similar problem and I could solve it by upgrading capistrano-passenger to >= 0.2.1
Looks like the version change of passenger from 6.0.7 to 6.0.8 has introduces a problem. I see you are also on 6.0.8, so it might affect you, too!
Link to the capistrano-passenger issue

Why is the generation of my TYPO3 documentation failing without a proper error?

I have a new laptop and I try to render the Changelogs of TYPO3 locally based on the steps on https://docs.typo3.org/m/typo3/docs-how-to-document/master/en-us/RenderingDocs/Quickstart.html#render-documenation-with-docker. It continues until the end but show some non-zero exit codes at the end.
project : 0.0.0 : Makedir
makedir /ALL/Makedir
2021-02-16 10:32:50 654198, took: 173.34 seconds, toolchain: RenderDocumentation
REBUILD_NEEDED because of change, age 448186.6 of 168.0 hours, 18674.4 of 7.0 days
OK:
------------------------------------------------
FINAL STATUS is: FAILURE (exitcode 255)
because HTML builder failed
------------------------------------------------
exitcode: 0 39 ms
When I run the command in another documentation project, it renders just fine.
I found the issue with this. It seemed the docker container did not have enough memory allocated. I changed the available memory from 2 Gb to 4 Gb in Docker Desktop and this issue is solved with that.
You already solved the problem. But in case of similar errors: To get more information on a failure, you can also use this trick:
Create a directory tmp-GENERATED-temp before rendering. Usually, this is automatically created and then removedd after rendering. If you create it before rendering, you will find logfiles with more details in this directory.
See the Troubleshooting page.
I had some errors where I found the output in the console insufficient and this helped me to narrow down the problem.
In case of other problems, I would file an issue in the GitHub repo: https://github.com/t3docs/docker-render-documentation
Note: This is specific to TYPO3 docs rendering and may change in the future.

Ember-CLI error: file already exists

I am getting what looks to be a "classic" error when starting an Ember-CLI app:
EEXIST, file already exists.
I have consulted
Starting ember server with ember cli
And it seems like the issue in Broccoli has been fixed?
I tried deleting the node_modules folder and the tmp folder, running npm cache clear then npm install. But to no avail.
The weird thing is that there was never a file at templates/application.js (the reference file in the error below).
ember server
version: 0.1.5
Using `app.import` with a file in the root of `vendor/` causes a significant per
formance penalty. Please move `bower_components\modernizr\modernizr.js` into a s
ubdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant per
formance penalty. Please move `bower_components\fastclick\lib\fastclick.js` into
a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant per
formance penalty. Please move `bower_components\foundation\js\foundation.js` int
o a subdirectory.
Livereload server on port 35729
Serving on http://0.0.0.0:4200/
EEXIST, file already exists 'C:\file-path\tmp\template_compil
er-tmp_dest_dir-0waBduix.tmp\ember-base\templates\application.js'
Error: EEXIST, file already exists 'C:\file-path\tmp\template
_compiler-tmp_dest_dir-0waBduix.tmp\ember-base\templates\application.js'
at Object.fs.openSync (fs.js:432:18)
at Object.fs.writeFileSync (fs.js:971:15)
at Object.copyPreserveSync (C:\file-path\node_modules\emb
er-cli-emblem\node_modules\broccoli-emblem-compiler\node_modules\broccoli-filter
\node_modules\broccoli-kitchen-sink-helpers\index.js:150:8)
at C:\file-path\node_modules\ember-cli-emblem\node_module
s\broccoli-emblem-compiler\node_modules\broccoli-filter\index.js:41:19
at C:\file-path\node_modules\ember-cli-emblem\node_module
s\broccoli-emblem-compiler\node_modules\broccoli-filter\node_modules\promise-map
-series\index.js:11:14
at $$$internal$$tryCatch (C:\file-path\node_modules\ember
-cli-emblem\node_modules\broccoli-emblem-compiler\node_modules\broccoli-filter\n
ode_modules\rsvp\dist\rsvp.js:490:16)
at $$$internal$$invokeCallback (C:\file-path\node_modules
\ember-cli-emblem\node_modules\broccoli-emblem-compiler\node_modules\broccoli-fi
lter\node_modules\rsvp\dist\rsvp.js:502:17)
at $$$internal$$publish (C:\file-path\node_modules\ember-
cli-emblem\node_modules\broccoli-emblem-compiler\node_modules\broccoli-filter\no
de_modules\rsvp\dist\rsvp.js:473:11)
at Object.$$rsvp$asap$$flush [as _onImmediate] (C:\file-path\node_modules\ember-cli-emblem\node_modules\broccoli-emblem-compiler\node_mod
ules\broccoli-filter\node_modules\rsvp\dist\rsvp.js:1581:9)
at processImmediate [as _immediateCallback] (timers.js:336:15)
Found the problem!
I was using ember-cli-emblem and I had both an application.hbs and a application.emblem in the templates folder.
Apparently this is not allowed, one must have one or the other.

in wordpress, a valid callback for cp_admin_init and _canonical_charset

I'm using WordPress 3.5 with child-theme of Twenty Eleven 1.5. Suddenly I'm getting following Warning,
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'cp_admin_init' was given in /home/templ/public_html/wp-includes/plugin.php on line 406
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '_canonical_charset' was given in /home/templ/public_html/wp-includes/plugin.php on line 173
I'm using following plugins:
download-manager 2.3.9
wordpress-seo 1.4.7
wp-pagenavi 2.83
Some more points:
1) If I'm giving mysite.com it's giving above 2 line warning. If I give www.mysite.com, the following line also include,
Warning: Cannot modify header information - headers already sent by (output started at /home/templ/public_html/wp-includes/plugin.php:406) in /home/templ/public_html/wp-includes/pluggable.php on line 876
2) If I give mysite.com/wp-admin/ or www.mysite.com/wp-admin/, It's giving 1st warning and 3rd warning.
3) If I goto www.mysite.com/wp-login.php, It's giving following 5 warning.
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'cp_admin_init' was given in /home/templ/public_html/wp-includes/plugin.php on line 406
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '_canonical_charset' was given in /home/templ/public_html/wp-includes/plugin.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/templ/public_html/wp-includes/plugin.php:406) in /home/templ/public_html/wp-login.php on line 368
Warning: Cannot modify header information - headers already sent by (output started at /home/templ/public_html/wp-includes/plugin.php:406) in /home/templ/public_html/wp-login.php on line 380
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'wp_authenticate_spam_check' was given in /home/templ/public_html/wp-includes/plugin.php on line 173
4) If I give correct username and password, it's not going to login. giving following problem,
ERROR: Invalid username or incorrect password.
ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.
I'm trying to find solution. I can't. Can any-one help me?
This sounds like a corrupted install. So you have a few options to fix this:
Attempt to get logins operational again and doing an upgrade though the wp-admin: Explained Below.
Do a manual Update: http://codex.wordpress.org/Updating_WordPress#Manual_Update
But First: Make a Backup
Please be sure to backup your install! Before proceeding: http://codex.wordpress.org/WordPress_Backups
Getting Logins Working: Masking the symptoms
First I would disable debugging output because that should fix most of these issues. When a warning occurs in Wordpress, PHP starts writing the response body and closes the header section of the response. This means that whenever Wordpress tries to add another header after the original warning was raised, PHP will raise another warning:
Warning: Cannot modify header information - headers already sent by (output started at /home/templ/public_html/wp-includes/plugin.php:406) in /home/templ/public_html/wp-login.php on line 380
So if we disable debugging then we should be able to mask the symptoms. This is a quick patch for a larger problem that we will have to solve with an in-place upgrade
To Disable Debugging
Ensure that the following constants exist and are set correctly is in your wp-config.php file
define('WP_DEBUG', false);
and
define('WP_DEBUG_DISPLAY', false);
Now you should be able to login to your site as an administrator without errors.
Disable your Plugins
Disable all your plugins in Plugins -> Installed Plugins This is imperative so that we can make sure that the update goes smoothly.
Do an Update
Go to Dashboard -> Updates and click either Update Now or Re-install Now
Reactivate your Plugins
Reactivate all your plugins in Plugins -> Installed Plugins and update them if necessary.
That's It
That's the process for reinstalling Wordpress. The key here is that you have Debugging enabled on a production site which is not good. You should always have WP_DEBUG and WP_DEBUG_DISPLAY set to false in a production environment.

Warning: curl_setopt() [function.curl-setopt]: Invalid curl configuration option in facebook_base.php

A week ago I started to notice a problem with the php sdk file - facebook_base.php
sometimes when connected facebook member visit the site and the auto-login trigger I get 2 errors and sometimes only the first error (that is why I used it in my problem title)+ the site shows up but without showing that user is connected.
after a refresh no error is shown and the site for connected member shows up.
I've tried new version of php API and also old ones that worked and still problem remained.
any ideas what can cause the problem?
UPDATE: similar problem spotted here: https://developers.facebook.com/bugs/207087046099691?browse=search_512a0e37e7ecf6136191651
this is the errors:
Warning: curl_setopt() [function.curl-setopt]: Invalid curl configuration option in /home/admin/domains/mydomain.com/public_html/includes/base_facebook.php on line 970
Warning: curl_setopt_array() [function.curl-setopt-array]: Array keys must be CURLOPT constants or equivalent integer values in /home/admin/domains/mydomain.com/public_html/includes/base_facebook.php on line 946