I noticed that a newly-setup Angular project was not registering the changes inside its src/app folder, so I looked at the project's .gitignore file, but there is nothing that is causing the whole app directory to be ignored...
Searching for the term 'app' returns the following, but they cannot be responsible, right?
AppPackages/
App/[pP]layers/
Regardless, I commented them out, but no change.
When I try to add the app folder in GitBash, I get the following:
$ git add app/
The following paths are ignored by one of your .gitignore files:
myAngularApp/src/app
I am confused what is causing this directory to be ignored. Can someone please help me understand what I am missing?
Simply try to check which rule of which .gitignore is the cause for this error, using git check-ignore:
cd /path/to/repository
git check-ignore -v -- app/aFile_inside_app
That will give you a better idea of what is going on.
The OP CatarinaRuna confirms:
The command revealed that [Aa]pp/ in my .gitignore was the cause, but it wouldn't show up in my search, because I only looked for app : )
Related
I'm new to React. I have a problem I can not solve. I have an ".eslintcache" file, which was created for me automatically as soon as I created a new app in React using "create-react-app". I do not know why I have this file. I tried to delete it but it always comes back.
I ran this command - "npm uninstall -g eslint --save" - to delete eslint's directory but it does not help.
I do not know how to handle it, I did not find a solution to it, I would be happy to help.
It is part of the CRA bundle. I'd recommend just adding it to the .gitignore file if it isn't in there already.
From the ESLint docs:
Store the info about processed files in order to only operate on the changed ones. The cache is stored in .eslintcache by default. Enabling this option can dramatically improve ESLint's running time by ensuring that only changed files are linted.
It seems as new issue in React App (this issue opened on Nov 27, 2020)
Put .eslintcache in .gitignore also do:
git rm -rf --cached .eslintcache
git add .
git rm: remove files from working tree ...
-r: recursive removal in case of a directory name ...
-f or -force: Override the up-to-date check.
Details: https://git-scm.com/docs/git-rm
This file is part of the new version of create-react-app package, you can't avoid it to be added, just like other files being added. This is the bundle.
This is part of the new version in react. I also had files "reportWebVitals" and "setupTests", I deleted them and everything works properly.
With "reportWebVitals" you can track real user performance on your site.
And with "setupTests" you are Initializing Test Environment
this feature is available with react-scripts#4.0.0 and higher
I do not need these properties, just deleted them and that's it, the eslintcache can not be deleted is part of the bundle.
I faced the problem, tried putting .eslintcache in .gitignore and implement the command git add . but was not enough, because you should do git add . after every change in your code, and that's not sence at all of course, this is not a clean workround anyway.
So, simply i downgraded the react-scripts to #4.0.0, and that problem disapeared completely
I think the react-scripts#4+ isn't stable yet
I ended up writing a custom plugin to delete the .eslintcache before each watch compile:
var exec = require("child_process").execSync;
module.exports = class ESLintClearPlugin {
constructor(options) {
this.options = options;
}
apply(compiler) {
compiler.hooks.watchRun.tap("ESLintClearPlugin", () => {
exec("del .eslintcache");
});
}
};
Then you use it in your webpack config:
const ESLintClearPlugin = require("./pathtofile");
// webpack config
plugins: [new ESLintClearPlugin()]
Having issues running gatsby build with gatsby-starter-wordpress-advanced theme:
Error: ENOENT: no such file or directory, open 'C:\Users\Tobias\Desktop\Gatsby\gatsby-starter-wordpress-advanced\.template-cache\tmp-\.js'"
I figured this might be a problem with the path. The path should rather look like:
writing tmp-new-page/ template: open '.template-cache/tmp-new-page.js'
See repo: https://github.com/henrikwirth/gatsby-starter-wordpress-advanced/blob/master/create/utils.js
Line 53 you find the function createPageWithTemplate. I've tried console.log(page.uri) to see what's going on. It outputs the filename correctly. I've also tried with gatsby clean to clear the cache. It seems to be some kind of backslash issue where the path comes with a \ .js at the end instead of sample-page.js:
no such file or directory, open 'C:\Users\Tobias\Desktop\Gatsby\gatsby-starter-wordpress-advanced\.template-cache\sample-page\.js'
The issue have been resolved. The problem was related to update in WPGraphQL WordPress plugin. Had to update the paths, because the page.uri is different in the newer versions of WPGraphQL. Before it was just: some-page now it is /some-page/.
Secondly in the page template creation process the theme was using the uri, therefore, this messed up the paths for the template files. This has been switched to page.slug instead now and some extra checks, to make sure the frontPage is not ending up producing a wrong path.
The master branch of the starter theme have been updated.
In a recent SDK update, it seems that Google has added a INFO level log into the dev_appserver that prints out each and every time a file change is detected.
This, in my opinion, just clutters up the log with information I already know thus I don't want it to be printed out on my console.
INFO 2014-11-27 09:52:43,876 module.py:391] [default] Detected file changes:
/Users/michael/app/templates/home
/Users/michael/app/templates/home/index.html
Is there any way to remove these lines from the log? Since this is a INFO level log, I can't really remove the INFO from the log_level as other INFO logs come in handy many times...
Any suggestions?
It's now an issue on the App Engine issue tracker. Vote it up for quicker resolution.
https://code.google.com/p/googleappengine/issues/detail?id=11662
This issue started to bug me also, so here's my quick-fix until devs find more permanent solution:
in path-to-SDK\google\appengine\tools\devappserver2\module.py comment out lines 424-426.
424 # logging.info(
425 # '[%s] Detected file changes:\n %s', self.name,
426 # '\n '.join(sorted(file_changes)))
Just have to remember to do it again when the build changes, if they don't fix it. (I'm working with 1.9.20 atm) (:
As Derek Perkins pointed out, this was sent to the App Engine Issue tracker. Since I had the same problem I starred the issue. I was happily surprised to see it was actually sent up to engineering and they updated the tracker today with a workaround. I rewrote parts of it and added a bit of formatting :)
Root cause of the problem
The main reason behind why every file in a project's folder is tracked is because the reload logic is naïve and has no way of knowing which files are actually being in use.
In the event that some data file contents are changed, but only loaded at module import time (for instance templates in some frameworks), it's difficult for the devserver to accurately detect such changes.
Workaround for Git and Mercurial
If you put your project folder anywhere but the root of your git repo, it will make all the .git files appear outside of your project's dir, so the changes to the files should not be seen and therefore shouldn't trigger a webserver reload. For instance build your project's structure this way :
myproject/
myproject/.git/
myproject/.gitignore
myproject/myapp/
myproject/myapp/app.yaml
myproject/README
Then run the devserver inside of myproject/myapp instead of "myproject".
There is also a mention that this has been tested on Git and Mercurial, but it won't work on CVS or SVN.
I'm attempting to update an application which takes advantage of two modules (default and batchratings).
After running 'appcfg update app.yaml batchratings.yaml', I receive the following output:
Error 400: --- begin server output ---
Validation error: Invalid dispatch configuration - module 'batchratings' does not exist. Upload a version of this module and try again.
Given that that's precisely what I'm attempting to do by following the steps outlined in the Modules walkthrough, I'm fairly certain I'm overlooking something obvious.
The source is available here:
https://dl.dropboxusercontent.com/u/7537204/literumble.zip, if that helps anyone.
I'd be very appreciative if anyone had some insight to provide regarding which direction I should be looking to ferret out the issue.
I had the same issue, I was trying to do something like:
appcfg.py update <my_app_dir> app.yaml batchratings.yaml
but the appcfg.py help update shows that if you pass a directory it will always take app.yaml. To take the other modules you need to use the file path for each:
appcfg.py update <my_app_dir>/app.yaml
appcfg.py update <my_app_dir>/batchratings.yaml
To figure this out, it helped me to pass -v to make sure it was updating the module i passed.
If your app has modules then, rather than running appcfg.py my_app_dir, you can instead cd my_app_dir and then run appcfg.py app.yaml mod1.yaml mod2.yaml etc.
Do not run appcfg.py *.yaml otherwise you risk including dispatch.yaml, if present, because that will fail with "Unexpected attribute 'dispatch' for object of type AppInfoExternal".
And be sure to run appcfg.py update_dispatch . afterwards, to upload dispatch entries.
I first thought it had something to do with the app.yaml not having the modules, but that's incorrect as per the examples I'm looking at.
I think it may actually be a very silly thing, in which your dispatch.yaml is pointing to 'batchratings' but your actual module name is 'BatchRankings.py'. Notice the capitalization.
Typing the command "cake" in console shows no output, no errors or anything like that. It just prints about 4 blank lines.
Has anyone else experience this problem before and how did you fix it?
C:\xampp\htdocs\project\app>cake
C:\xampp\htdocs\project\app>
I have had similar problem a moment ago and I found the solution. the problem was not the path for me. I have turn on the debug from 0 to 2. and it shows some error instead of empty output and I try to fix the error (which was in the core.php) and it works now.
So try to debug it like me and fix the error.
Hope it helps.
cake is not directly available in app - while you are in the right folder you still need to call the cake command relative from there:
\app>.\Console\cake
Note that this syntax is unique to Windows
For UNIX use
\app>Console/cake
In case you are using an old app version or didnt bake your application with the Console folder (which you should, though), you can also call the cake core version of it relatively from the APP dir:
\app>..\lib\Cake\Console\cake
(WIN)
\app>../lib/Cake/Console/cake
(UNIX)
Either way the cake file needs to have sufficient execution rights (UNIX mainly) and PHP must be in the system env path. Then it will all work out of the box.
Run this command in Cake/Console folder. I think you are not running it in the right folder.
In this directory:
C:\xampp\htdocs\project\app>
type this command:
php Console/cake.php
which will output:
Current Paths:
-app: app
-working: C:\xampp\htdocs\project\app
-root: C:\xampp\htdocs\project
-core: C:\xampp\htdocs\project\lib
Changing Paths:
Your working path should be the same as your application path. To change your path use the '-app' param.
Example: -app relative/path/to/myapp or -app /absolute/path/to/myapp
....
Similar issue encountered where Console wasn't outputting anything after installing Cake via Composer instead of git clone - no error, just returning a blank line. To solve it I made a backup of app/ (mv app/ app.bak/) and then used vendor/bin/cake -app app bake to bake a brand new app/ folder. Once that process was complete running Console from app/Console/cake started working again. Then just moved my app.bak/ code back in place. I'm assuming over time the paths present or code in app/Console had become unworkable.
Bringing back in the old code I was able to narrow down the issue to using Apc as a cache engine. Reverting to $engine = 'File'; in core.php and bootstrap.php solved the problem and Console worked as expected.
I guess you are using a composer powered cakephp which has console command in Vendor folder. If so, try this ;
AppRoot/Vendor/bin/cake
or you may try with full path to fw;
PATH_TO_APP\Vendor\cakephp\cakephp\lib\Cake\Console\cake.bat