vscode-php-intellisense icon indicating copy to clipboard operation
vscode-php-intellisense copied to clipboard

Cannot open file 'HasOneOrMany.php': File not found

Open andreshg112 opened this issue 6 years ago • 8 comments

Issue Type: Bug

Note: VS Code contributor told me to post the issue here: https://github.com/Microsoft/vscode/issues/48687#issuecomment-384515745

The whole message is this: No se puede abrir 'HasOneOrMany.php': Archivo no encontrado (file:///opt/lampp/htdocs/saberapp-voyager/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php).

I had a project named "saberapp-voyager". I deleted it. I created a new one called saberapp-admin in the same directory. Now, when I try to go to the definition of a function or class, this error happens. I use PHP Intellisense from Felix Becker. I disabled and enabled, uninstalled and installed the extension but It didn't work. I also deleted recent files and folders.

This is what the log shows: [2018-04-25 11:26:23.083] [renderer1] [error] Archivo no encontrado (file:///opt/lampp/htdocs/saberapp-voyager/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php): Error: Archivo no encontrado (file:///opt/lampp/htdocs/saberapp-voyager/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php) at new t (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:1256:806) at file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2885:812 at /usr/share/code/resources/app/node_modules.asar/graceful-fs/graceful-fs.js:241:16 at FSReqWrap.oncomplete (original-fs.js:114:15)

VS Code version: Code 1.22.2 (3aeede733d9a3098f7b4bdc1f66b63b0f48c1ef9, 2018-04-12T16:34:44.222Z) OS version: Linux x64 4.13.0-39-generic

System Info
Item Value
CPUs Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz (4 x 2486)
Load (avg) 1, 1, 1
Memory (System) 7.71GB (0.99GB free)
Process Argv /usr/share/code/code --unity-launch
Screen Reader no
VM 0%
Extensions (43)
Extension Author (truncated) Version
ng-template Ang 0.1.9
bracket-pair-colorizer Coe 1.0.37
compulim-vscode-closetag Com 1.1.0
vscode-markdownlint Dav 0.15.0
empty-indent Dmi 0.2.0
EditorConfig Edi 0.12.1
beautify Hoo 1.3.0
php-namespace-resolver Meh 1.0.5
material-icon-theme PKi 3.3.0
code-settings-sync Sha 2.9.0
indenticator Sir 0.5.1
ionic2 Tha 3.0.2
html-css-class-completion Zig 1.17.1
html-snippets abu 0.2.1
vscode-javascript-snippet-pack aka 0.1.5
vscode-angular2-files ale 1.4.4
htmltagwrap bra 0.0.7
mapfile chi 0.0.1
path-intellisense chr 1.4.2
laravel-goto-view cod 1.2.0
vscode-eslint dba 1.4.8
githistory don 0.4.0
jquerysnippets don 0.0.1
tslint eg2 1.0.28
apacheconf-snippets eim 1.1.9
php-debug fel 1.12.3
php-intellisense fel 2.3.1
auto-rename-tag for 0.0.15
mysql-syntax jak 1.3.1
Angular1 joh 0.2.0
Angular2 joh 2.16.1
vscode-phpfmt kok 1.0.19
dotenv mik 1.0.1
vscode-apache mrm 1.1.1
php-docblocker nei 1.6.0
indent-rainbow ode 7.2.2
laravel-blade one 1.18.0
laravel5-snippets one 1.4.0
ionic2-snippets oud 1.0.0
laravel-artisan rya 0.0.17
html5-boilerplate sid 1.0.1
highlight-matching-tag vin 0.4.4
bootstrap-3-snippets wcw 0.1.0

(2 theme extensions excluded)

andreshg112 avatar Apr 26 '18 19:04 andreshg112

Deleting your cache directory should do it:

https://github.com/felixfbecker/php-language-server/blob/7e1ca75863dfed0c782b5bfbec85c6d70401c355/src/Cache/FileSystemCache.php#L20-L26

felixfbecker avatar Apr 26 '18 19:04 felixfbecker

What is the cache directory? ~/.vscode?

andreshg112 avatar Apr 27 '18 02:04 andreshg112

Depends. Please see the link above how it's determined.

felixfbecker avatar Apr 27 '18 02:04 felixfbecker

I've found it: ~/.phpls/

Should I delete it?

andreshg112 avatar Apr 27 '18 02:04 andreshg112

Yes

felixfbecker avatar Apr 27 '18 02:04 felixfbecker

It worked! However, I wouldn't like to delete all the cache if the error happens again. Thank you!

andreshg112 avatar Apr 27 '18 03:04 andreshg112

Happened to me too, very annoying, is this related to felixfbecker/php-language-server#513?

razvanphp avatar Aug 09 '18 20:08 razvanphp

Issue Type: Bug

Note: VS Code contributor told me to post the issue here: microsoft/vscode#48687 (comment)

The whole message is this: No se puede abrir 'HasOneOrMany.php': Archivo no encontrado (file:///opt/lampp/htdocs/saberapp-voyager/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php).

I had a project named "saberapp-voyager". I deleted it. I created a new one called saberapp-admin in the same directory. Now, when I try to go to the definition of a function or class, this error happens. I use PHP Intellisense from Felix Becker. I disabled and enabled, uninstalled and installed the extension but It didn't work. I also deleted recent files and folders.

This is what the log shows: [2018-04-25 11:26:23.083] [renderer1] [error] Archivo no encontrado (file:///opt/lampp/htdocs/saberapp-voyager/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php): Error: Archivo no encontrado (file:///opt/lampp/htdocs/saberapp-voyager/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php) at new t (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:1256:806) at file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2885:812 at /usr/share/code/resources/app/node_modules.asar/graceful-fs/graceful-fs.js:241:16 at FSReqWrap.oncomplete (original-fs.js:114:15)

VS Code version: Code 1.22.2 (3aeede733d9a3098f7b4bdc1f66b63b0f48c1ef9, 2018-04-12T16:34:44.222Z) OS version: Linux x64 4.13.0-39-generic

System Info Extensions (43)

me too

sinergantara avatar May 05 '21 05:05 sinergantara