Chyba pri spustení projektu na macu
- Sanada
- Člen | 18
Nainštaloval som si aj composer a vytvoril som prvotný projekt
composer create-project nette/web-project moj_project
následne som spustil …
localhost:3000/www/
a ukázalo mi chybu …
Cannot load presenter 'Www', class 'App\Presenters\WwwPresenter' was not found.
Už som zúfalý … ani tak, ani tak … ani starý jednoduchý projekt mi nefunguje … ani nový vytvorený pomocou composera …
- Sanada
- Člen | 18
mystik napsal(a):
Proc u toho posledniho davas do url to /www/? Podle te chyby ti docroot smeruje spravne do www takze to www v url je uz navic a appka ho zkousi interpretovat jako nazev presenteru.
Pretože bez /www mi ani neukáže žiadnu stránku ..
1.) spušťam nette cez macbook … mám phpserver …
2.) vo finderi kliknem na priečinok môjho projektu ⇒ vlastnosti ⇒ Nový
tab Terminálu v priečinku ⇒ následne v terminálu zadám príkaz ⇒ php
-S localhost:3000 … čím sa spustí localhost … a keďže som prvotnú
cestu dal na priečinok s názvom projektu … za localhost:3000 pripojiť
cestu k www priečinku …
- Sanada
- Člen | 18
mystik napsal(a):
Jinak celkove to vypada ze mas konflikt mezi verzi PHP pro kterou jsi instaloval zavislosti a verzi na ktere to spoustis.
Jak vypada tvuj composer.json a co ukaze composer show?
composer.json
{
"name": "nette/web-project",
"description": "Nette: Standard Web Project",
"keywords": ["nette"],
"type": "project",
"license": ["MIT", "BSD-3-Clause", "GPL-2.0", "GPL-3.0"],
"require": {
"php": ">= 8.0",
"nette/application": "^3.1",
"nette/bootstrap": "^3.2",
"nette/caching": "^3.2",
"nette/database": "^3.1",
"nette/di": "^3.1",
"nette/forms": "^3.1",
"nette/http": "^3.2",
"nette/mail": "^4.0",
"nette/robot-loader": "^4.0",
"nette/security": "^3.1",
"nette/utils": "^4.0",
"latte/latte": "^3.0",
"tracy/tracy": "^2.9"
},
"require-dev": {
"nette/tester": "^2.4",
"symfony/thanks": "^1"
},
"autoload": {
"psr-4": {
"App\\": "app"
}
},
"minimum-stability": "stable",
"config": {
"allow-plugins": {
"symfony/thanks": true
}
}
}
composer show ukazuje …
latte/latte v3.0.6 ☕ Latte: the intuitive and fast template engine for those who want the most secure PHP sites. Introduces context-sensitive escaping.
nette/application v3.1.10 🏆 Nette Application: a full-stack component-based MVC kernel for PHP that helps you write powerful and modern web applications. Write less, have cleaner code and your work will...
nette/bootstrap v3.2.0 🅱 Nette Bootstrap: the simple way to configure and bootstrap your Nette application.
nette/caching v3.2.2 ⏱ Nette Caching: library with easy-to-use API and many cache backends.
nette/component-model v3.0.3 ⚛ Nette Component Model
nette/database v3.1.7 💾 Nette Database: layer with a familiar PDO-like API but much more powerful. Building queries, advanced joins, drivers for MySQL, PostgreSQL, SQLite, MS SQL Server and Oracle.
nette/di v3.1.2 💎 Nette Dependency Injection Container: Flexible, compiled and full-featured DIC with perfectly usable autowiring and support for all new PHP features.
nette/finder v3.0.0 🔍 Nette Finder: find files and directories with an intuitive API.
nette/forms v3.1.11 📝 Nette Forms: generating, validating and processing secure forms in PHP. Handy API, fully customizable, server & client side validation and mature design.
nette/http v3.2.2 🌐 Nette Http: abstraction for HTTP request, response and session. Provides careful data sanitization and utility for URL and cookies manipulation.
nette/mail v4.0.0 📧 Nette Mail: handy email creation and transfer library for PHP with both text and MIME-compliant support.
nette/neon v3.4.0 🍸 Nette NEON: encodes and decodes NEON file format.
nette/php-generator v4.0.6 🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.2 features.
nette/robot-loader v4.0.0 🍀 Nette RobotLoader: high performance and comfortable autoloader that will search and autoload classes within your application.
nette/routing v3.0.4 Nette Routing: two-ways URL conversion
nette/schema v1.2.3 📐 Nette Schema: validating data structures against a given Schema.
nette/security v3.1.7 🔑 Nette Security: provides authentication, authorization and a role-based access control management via ACL (Access Control List)
nette/tester v2.5.0 Nette Tester: enjoyable unit testing in PHP with code coverage reporter. 🍏🍏🍎🍏
nette/utils v4.0.0 🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.
symfony/thanks v1.2.10 Encourages sending ⭐ and 💵 to fellow PHP package maintainers (not limited to Symfony components)!
tracy/tracy v2.10.2 😎 Tracy: the addictive tool to ease debugging PHP code for cool developers. Friendly design, logging, profiler, advanced features like debugging AJAX calls or CLI support. You...
- Sanada
- Člen | 18
A čo sa týka tých starších projektov, tak tam je možné, že je
konflikt so starým nette / verziou PHP …
ale pokiaľ dám …
composer upgrade nette
tak mi ho zvýši z 2.4 (starý projekt) na 2.5 … ale viac mi nejde … php som mal vtedy, keď som vytváral tento projekt asi 7.4 ak sa nemýlim …