gpt4 book ai didi

yeoman - 错误没有这样的文件或目录 'bower_components'

转载 作者:行者123 更新时间:2023-12-03 11:53:25 24 4
gpt4 key购买 nike

我正在尝试制作我的第一个yeoman应用程序。我遵循以下链接中的每个步骤:http://ponderingdeveloper.com/2013/03/08/preparing-a-windows-machine-to-use-yeoman/

当我执行yo webapp时,一切顺利。

但是,当我使用grunt命令时,会遇到以下错误:

    grunt --trace


Running "jshint:all" (jshint) task
>> 4 files lint free.

Running "clean:server" (clean) task
Cleaning ".tmp"...OK

Running "concurrent:test" (concurrent) task

Running "coffee:dist" (coffee) task
Warning: Errno::ENOENT on line ["33"] of C: No such file or directory - C:/D
ysk Google/Sublime/Norbert/motocycle/app/bower_components
Run with --trace to see the full backtrace Use --force to continue.

Aborted due to warnings.

我寻找了bower_components文件夹-该文件夹不存在。我知道我可以在 .bowerrc文件中更改目录,但是我不知道哪个目录是正确的,我找不到它。

编辑:程序版本:
C:\Dysk Google\Sublime\Norbert\motocycle>grunt --version
grunt-cli v0.1.8
grunt v0.4.1

C:\Dysk Google\Sublime\Norbert\motocycle>yo --version
1.0.0-beta.6

C:\Dysk Google\Sublime\Norbert\motocycle>bower --version
0.9.2

C:\Dysk Google\Sublime\Norbert\motocycle>npm view generator-webapp
npm http GET https://registry.npmjs.org/generator-webapp
npm http 200 https://registry.npmjs.org/generator-webapp

{ name: 'generator-webapp',
description: 'Default Yeoman generator for scaffolding out a front-end web app
',
'dist-tags': { latest: '0.2.2' },
versions:
[ '0.1.0',
'0.1.1',
'0.1.2',
'0.1.3',
'0.1.4',
'0.1.5',
'0.1.6',
'0.1.7',
'0.2.0',
'0.2.1',
'0.2.2' ],
maintainers: 'sindresorhus <sindresorhus@gmail.com>',
time:
{ '0.1.0': '2013-02-14T18:59:31.790Z',
'0.1.1': '2013-02-14T20:50:59.965Z',
'0.1.2': '2013-02-15T16:08:42.448Z',
'0.1.3': '2013-02-15T23:08:13.255Z',
'0.1.4': '2013-02-16T01:02:02.732Z',
'0.1.5': '2013-02-25T19:56:03.458Z',
'0.1.6': '2013-04-08T21:07:10.932Z',
'0.1.7': '2013-04-10T22:12:39.652Z',
'0.2.0': '2013-05-13T17:53:11.177Z',
'0.2.1': '2013-05-13T18:06:06.017Z',
'0.2.2': '2013-05-13T18:09:12.609Z' },
author: 'Chrome Developer Relations',
repository:
{ type: 'git',
url: 'git://github.com/yeoman/generator-webapp.git' },
users: { passy: true },
version: '0.2.2',
keywords:
[ 'yeoman-generator',
'web',
'app',
'front-end',
'h5bp',
'modernizr' ],
homepage: 'https://github.com/yeoman/generator-webapp',
bugs: 'https://github.com/yeoman/generator-webapp/issues',
main: 'app/index.js',
scripts: { test: 'mocha --reporter spec' },
dependencies:
{ 'yeoman-generator': '~0.11.1',
cheerio: '~0.10.8' },
peerDependencies: { 'generator-mocha': '~0.1.1' },
devDependencies: { mocha: '~1.9.0' },
engines: { node: '>=0.8.0' },
licenses: { type: 'BSD' },
readmeFilename: 'readme.md',
dist:
{ shasum: 'd9f69e7dbf0fd680b30abaf710d47fe38e50fd12',
tarball: 'http://registry.npmjs.org/generator-webapp/-/generator-webapp-0.2
.2.tgz' },
directories: {} }

最佳答案

我只是遇到了类似的问题,试图解决问题时碰到了这篇文章。我想出了在a closed GitHub issue for the Yeoman project中找到的提示。

对我来说,解决方案是删除~/.bower目录(Mac),然后在项目的主目录中再次运行bower install。完成该操作后,我发现应该位于bower_components目录,并且示例项目按预期运行。看起来您好像在Windows计算机上,但不确定该Bower目录在何处,但是如果可以找到它,请尝试一下。

关于yeoman - 错误没有这样的文件或目录 'bower_components',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16794147/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com