Ant-design-pro: 引用普通css问题

Created on 19 Nov 2018  ·  11Comments  ·  Source: ant-design/ant-design-pro

import 'font-awesome/css/font-awesome.min.css';

ERROR Failed to compile with 1 errors 17:24:11

This dependency was not found:

  • font-awesome in dll umi

To install it, you can run: npm install --save font-awesome
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: cross-env APP_TYPE=site umi dev
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.

Most helpful comment

@michael811 放到 dev dependencies里面就好了,umi 的报错有点不友好

All 11 comments

font-awesome
找不到

已经安装上的

已经开搞pro了。硬着头皮搞吧。真后悔用pro,

真后悔用pro

那就别用。

真后悔用pro

那就别用。

嗯,改起来不灵活。

@chalbo
这个问题解决了吗?

font-awesome
找不到

遇到同样问题,用命令”npm install --save font-awesome“ 装完还是报这个错,在package.json里把这个删掉就好了,但是commit的时候又报错找不到,请问如何解决?

问题总结:
装完后npm start报楼主的错
在package.json里删掉‘font-awesome’后commit的时候报错:
error 'font-awesome' should be listed in the project's dependencies. Run 'npm i -S font-awesome' to add it import/no-extraneous-dependencies

不用就解决了发自我的iPhone------------------ 原始邮件 ------------------发件人: Michael notifications@github.com发送时间: 2018年11月23日 12:41收件人: ant-design/ant-design-pro ant-design-pro@noreply.github.com抄送: chalbo zb2573156@163.com, Mention mention@noreply.github.com主题: 回复:[ant-design/ant-design-pro] 引用普通css问题 (#2908)@chalbo
这个问题解决了吗?

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/ant-design/ant-design-pro","title":"ant-design/ant-design-pro","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/ant-design/ant-design-pro"}},"updates":{"snippets":[{"icon":"PERSON","message":"@michael811 in #2908: @chalbo \r\n这个问题解决了吗?"}],"action":{"name":"View Issue","url":"https://github.com/ant-design/ant-design-pro/issues/2908#issuecomment-441155375"}}}
[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/ant-design/ant-design-pro/issues/2908#issuecomment-441155375",
"url": "https://github.com/ant-design/ant-design-pro/issues/2908#issuecomment-441155375",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [ant-design/ant-design-pro] 引用普通css问题 (#2908)",
"sections": [
{
"text": "",
"activityTitle": "Michael",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@michael811",
"facts": [

]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"ant-design/ant-design-pro\",\n\"issueId\": 2908,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/ant-design/ant-design-pro/issues/2908#issuecomment-441155375"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 413332280\n}"
}
],
"themeColor": "26292E"
}
]

@xiaohuoni @afc163
font-awesome的问题有解决办法吗?

遇到同样问题,用命令”npm install --save font-awesome“ 装完还是报这个错,在package.json里把这个删掉就好了,但是commit的时候又报错找不到,请问如何解决?

问题总结:
装完后npm start报楼主的错
在package.json里删掉‘font-awesome’后commit的时候报错:
error 'font-awesome' should be listed in the project's dependencies. Run 'npm i -S font-awesome' to add it import/no-extraneous-dependencies

@michael811 放到 dev dependencies里面就好了,umi 的报错有点不友好

@chenshuai2144 thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhongjiewu picture zhongjiewu  ·  3Comments

RichardStark picture RichardStark  ·  3Comments

gaoqiang19514 picture gaoqiang19514  ·  3Comments

yjz1004 picture yjz1004  ·  3Comments

yaoleiroyal picture yaoleiroyal  ·  3Comments