错误消息:
PHP User Error – yii\base\ErrorException Exception 'yii\base\InvalidArgumentException' with message 'The file or directory to be published does not exist: C:\myProject\vendor\bower/jquery/dist'
in C:\myProject\vendor\yiisoft\yii2\web\AssetManager.php:456
问题:yii2资产管理器正在查找不存在的供应商文件夹bower和不存在的bower资产。更改别名,编写器。json、composer、fxp/composer资产插件似乎对错误没有任何影响。
已尝试以下Stackoverflow Recipes:
修复过时的fxp插件
混淆现象
我也尝试了所有这些“修复”,没有任何改变(非常精确地描述了我的问题)
设置:
PHP7.2。11(使用7.1和7.0进行试验时,结果相同)
Windows 7 Pro 64位英文
作曲家版本1.7.2:
作曲家全球信息:
C:\Users\me\Desktop\test2>composer global info
Changed current directory to C:/Users/me/AppData/Roaming/Composer
codeception/codeception 2.0.16 BDD-style testing framework
codeception/specify 0.4.6 BDD code blocks for PHPUnit and Codeception
codeception/verify 0.4.0 BDD assertion library for PHPUnit
doctrine/instantiator 1.1.0 A small, lightweight utility to instantiate object...
facebook/webdriver v0.6.0 A php client for WebDriver
fxp/composer-asset-plugin v1.4.4 NPM/Bower Dependency Manager for Composer
guzzlehttp/guzzle 5.3.3 Guzzle is a PHP HTTP client library and framework ...
guzzlehttp/ringphp 1.1.1 Provides a simple API and specification that abstr...
guzzlehttp/streams 3.0.0 Provides a simple abstraction over streams of data
myclabs/deep-copy 1.8.1 Create deep copies (clones) of your objects
phpdocumentor/reflection-common 1.0.1 Common reflection classes used by phpdocumentor to...
phpdocumentor/reflection-docblock 4.3.0 With this component, a library can provide support...
phpdocumentor/type-resolver 0.4.0
phpspec/prophecy 1.8.0 Highly opinionated mocking framework for PHP 5.3+
phpunit/php-code-coverage 2.2.4 Library that provides collection, processing, and ...
phpunit/php-file-iterator 1.4.5 FilterIterator implementation that filters files b...
phpunit/php-text-template 1.2.1 Simple template engine.
phpunit/php-timer 2.0.0 Utility class for timing
phpunit/php-token-stream 1.4.12 Wrapper around PHP's tokenizer extension.
phpunit/phpunit 4.7.7 The PHP Unit Testing framework.
phpunit/phpunit-mock-objects 2.3.8 Mock Object library for PHPUnit
psr/log 1.0.2 Common interface for logging libraries
react/promise v2.7.0 A lightweight implementation of CommonJS Promises/...
sebastian/comparator 1.2.4 Provides the functionality to compare PHP values f...
sebastian/diff 1.4.3 Diff implementation
sebastian/environment 1.3.8 Provides functionality to handle HHVM/PHP environm...
sebastian/exporter 1.2.2 Provides the functionality to export PHP variables...
sebastian/global-state 1.1.1 Snapshotting of global state
sebastian/recursion-context 1.0.5 Provides functionality to recursively process PHP ...
sebastian/version 1.0.6 Library that helps with managing the version numbe...
symfony/browser-kit v2.8.46 Symfony BrowserKit Component
symfony/console v2.8.46 Symfony Console Component
symfony/css-selector v2.8.46 Symfony CssSelector Component
symfony/debug v3.0.9 Symfony Debug Component
symfony/dom-crawler v2.8.46 Symfony DomCrawler Component
symfony/event-dispatcher v2.8.46 Symfony EventDispatcher Component
symfony/finder v2.8.46 Symfony Finder Component
symfony/polyfill-ctype v1.9.0 Symfony polyfill for ctype functions
symfony/polyfill-mbstring v1.9.0 Symfony polyfill for the Mbstring extension
symfony/yaml v2.8.46 Symfony Yaml Component
webmozart/assert 1.3.0 Assertions to validate method input/output with ni...
(以上信息告知您:fxp/composer资产插件v1.4.4 NPM/Bower composer依赖关系管理器)
作曲家。json:(也许问题就在这里?)
{
"name": "yiisoft/yii2-app-advanced",
"description": "Yii 2 Advanced Application Template",
"keywords": ["yii2", "framework", "advanced", "application template"],
"homepage": "http://www.yiiframework.com/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "http://www.yiiframework.com/forum/",
"wiki": "http://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "dev",
"require": {
"php": ">=7.1.0",
"yiisoft/yii2": "dev-master",
"yiisoft/yii2-bootstrap": "*",
"yiisoft/yii2-swiftmailer": "*",
"yiisoft/yii2-jui": "@dev",
"kartik-v/yii2-label-inplace": "*",
"kartik-v/yii2-widgets": "*",
"kartik-v/yii2-grid": "*",
"kartik-v/yii2-mpdf": "dev-master@dev",
"kartik-v/yii2-detail-view": "dev-master",
"kartik-v/yii2-password": "dev-master",
"himiklab/yii2-jqgrid-widget" : "@dev",
"dmstr/yii2-adminlte-asset": "2.*",
"philippfrenzel/yii2fullcalendar":"*",
"simplepie/simplepie": "dev-master",
"insolita/yii2-adminlte-widgets": "*",
"attybean/easyii": "dev-master",
"kartik-v/yii2-tabs-x": "*",
"kartik-v/yii2-builder": "dev-master",
"kartik-v/yii2-nav-x": "*",
"kartik-v/yii2-checkbox-x": "*",
"kartik-v/yii2-widget-select2": "@dev",
"wbraganca/yii2-dynamicform": "dev-master",
"nkovacs/yii2-datetimepicker": "*",
"kartik-v/yii2-editable": "*",
"wbraganca/yii2-fancytree-widget": "*",
"bower-asset/sweetalert": "1.1.*",
"bower-asset/sweetalert2": "*",
"kartik-v/yii2-tree-manager": "@dev",
"kartik-v/yii2-context-menu": "*",
"liyunfang/yii2-contextmenu": "*",
"kartik-v/yii2-export": "*",
"attybean/yii2-admin":"dev-master",
"kartik-v/yii2-dynagrid": "@dev",
"kartik-v/yii2-datecontrol": "dev-master",
"2amigos/yii2-multi-select-widget" : "*",
"firebase/php-jwt": "dev-master"
},
"require-dev": {
"yiisoft/yii2-debug": "*",
"yiisoft/yii2-gii": "*",
"yiisoft/yii2-faker": "*",
"codeception/base": "*",
"phpunit/phpunit": "*",
"codeception/verify": "*"
},
"extra": {
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
},
"config": {
"process-timeout": 1800,
"fxp-asset": {
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
},
"installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
},
"repositories": {
"bower-asset/eve": {
"type":"bower-vcs",
"url":"https://github.com/adobe-webplatform/eve.git"
}
}
}
},
"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
}
]
}
在将“fxp资产”或存储库“bower资产/eve”添加到composer的配置部分之前,结果是相同的。json:-(
是否有可能找到yii2寻找宝华而非宝华资产的原因?供应商文件夹已被删除,composer缓存已清空,fxp已从composer全局删除,再次需要。
不,将bower资产重命名为bower不是首选解决方案。
您需要在配置中更改别名:
'aliases' => [
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
],
请参阅基本应用程序模板中的示例。
我想将jQuery添加到我的Visual Studio 2017项目中<我加了一个凉亭。json和a。bowerrc 我的bower.json档案: 我的. Bowerrc文件: 我和你一起工作。NETCore2,每当我尝试安装Bower软件包时,都会收到一条通用错误消息<我做错什么了吗?
代理后超时失败,设置如下(某些设置无效…): 我还尝试过安装/卸载bower和
更新:visualstudio-File-New-Project-ASP。NET核心Web应用程序(.NET核心)-Web应用程序 我保留了默认名称WebApplication1 > 展开www root文件夹 向上扩展到www root/lib/jquery-验证 下面的文字是在我更新这个Q之前 我在VS2015CE中创建了一个空的ASP. NET Core MVC Web应用程序。我添加了bo
我安装凉亭 我正处于凉亭安装教程的第一步。没有什么我可以补充这个问题,除了我是全新的鲍尔,它没有预期的工作。 我完全重新安装了git/node。全部重新设置,然后回到这个问题
我很抱歉,因为我还在学习如何使用ubuntu。 首先我安装了npm,然后我安装了git。然后我试图从git克隆一个repo。然后我输入以下到终端"bowers安装引导"。我已经在zip文件中下载了引导程序的源代码。我收到以下错误:- 我做错了什么? 在终端中键入“npm安装-g bowers”会产生上述错误。 这阻止了我进入“bower安装引导”