In my laravel 5.7 / Bootstrap 4.1 app
I installed font-awesome package with command
npm install font-awesome --save
and in my package.json I have :
"dependencies": {
...
"font-awesome": "^4.7.0",
...
}
In webpack.mix.js there is line :
mix.copy('node_modules/font-awesome/fonts', 'public/fonts');
In fonts directory I see
nick#nick:project/public/fonts$ ls -la
total 1080
drwxrwxrwx 1 root root 4096 лис 9 14:32 .
drwxrwxrwx 1 root root 4096 лис 6 06:04 ..
-rwxrwxrwx 1 root root 134808 лис 9 14:32 FontAwesome.otf
-rwxrwxrwx 1 root root 165742 лис 9 14:32 fontawesome-webfont.eot
-rwxrwxrwx 1 root root 444379 лис 9 14:32 fontawesome-webfont.svg
-rwxrwxrwx 1 root root 165548 лис 9 14:32 fontawesome-webfont.ttf
-rwxrwxrwx 1 root root 98024 лис 9 14:32 fontawesome-webfont.woff
-rwxrwxrwx 1 root root 77160 лис 9 14:32 fontawesome-webfont.woff2
drwxrwxrwx 1 root root 4096 лис 7 10:16 roboto
drwxrwxrwx 1 root root 0 лип 22 08:07 vendor
The problem is when I try to use these icons, not all of them are rendered.
Say icons fa fa-alicorn or fa fa-air-freshener are empty.
I select icon from this https://fontawesome.com/icons?d=gallery&q=freshener selector.
You can check it by http://votes.nilov-sergey-demo-apps.tk/admin/dashboard url, under "Icons Samples" block there some some icons
which are visible, but some not.
Why? Are these different version of icons in my app?
Thanks!
The icons that are not displaying are not available in your fontawesome version. You are using fontawesome v4, the missing icons are only available in fontawesome v5.
Here you can find all icons available for v4:
Here you can find the install guide for v5.
Related
I want to add Font Awesome in my Laravel 8/Tailwind CSS 2.0.1 application, and after searching, I install it the following way.
npm install font-awesome --save
Then I add the line in the file /mnt/_work_sdb8/wwwroot/lar/Hostels4/resources/css/app.css
#import 'tailwindcss/base';
#import 'tailwindcss/components';
#import 'tailwindcss/utilities';
#import "node_modules/font-awesome/scss/font-awesome.scss";
I get an error.
ERROR in ./resources/css/app.css Module build failed (from
./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
Error: Failed to find 'node_modules/font-awesome/scss/font-awesome.scss'
But I found the referenced file in...
node_modules/font-awesome/scss$ ls -la
total 105
drwxrwxrwx 1 root root 4096 May 21 14:12 .
drwxrwxrwx 1 root root 4096 May 21 14:12 ..
-rwxrwxrwx 1 root root 715 Oct 25 2016 _animated.scss
-rwxrwxrwx 1 root root 592 Oct 25 2016 _bordered-pulled.scss
-rwxrwxrwx 1 root root 459 Oct 25 2016 _core.scss
-rwxrwxrwx 1 root root 120 Oct 25 2016 _fixed-width.scss
-rwxrwxrwx 1 root root 430 Oct 25 2016 font-awesome.scss
-rwxrwxrwx 1 root root 50498 Oct 25 2016 _icons.scss
-rwxrwxrwx 1 root root 375 Oct 25 2016 _larger.scss
-rwxrwxrwx 1 root root 378 Oct 25 2016 _list.scss
-rwxrwxrwx 1 root root 1637 Oct 25 2016 _mixins.scss
-rwxrwxrwx 1 root root 783 Oct 25 2016 _path.scss
-rwxrwxrwx 1 root root 672 Oct 25 2016 _rotated-flipped.scss
-rwxrwxrwx 1 root root 134 Oct 25 2016 _screen-reader.scss
-rwxrwxrwx 1 root root 482 Oct 25 2016 _stacked.scss
-rwxrwxrwx 1 root root 22644 Oct 25 2016 _variables.scss
And in webpack.mix.js file resources/css/app.css is included by install:
const mix = require('laravel-mix');
mix.js('resources/js/app.js', 'public/js')
.postCss('resources/css/app.css', 'public/css', [
require('postcss-import'),
require('tailwindcss'),
]);
if (mix.inProduction()) {
mix.version();
}
$ node -v
v14.16.0
$ npm -v
7.14.0
$ php artisan --version
Laravel Framework 8.42.1
What is wrong, and how can it be fixed?
MODIFIED :
I found referenced dir with files :
/node_modules/font-awesome/css$ ls -la
total 100
drwxrwxrwx 1 root root 0 May 21 14:12 .
drwxrwxrwx 1 root root 4096 May 21 14:12 ..
-rwxrwxrwx 1 root root 37414 Oct 25 2016 font-awesome.css
-rwxrwxrwx 1 root root 21778 Oct 25 2016 font-awesome.css.map
-rwxrwxrwx 1 root root 31000 Oct 25 2016 font-awesome.min.css
But modifying file resources/css/app.css:
#import "node_modules/font-awesome/css/font-awesome.css";
I still see error :
ERROR in ./resources/css/app.css Module build failed (from
./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
Error: Failed to find 'node_modules/font-awesome/css/font-awesome.css'
It seems that I set the path/filename correctly, but why the error?
Since Laravel 8 now uses PostCSS you will likely want to ditch SASS and use CSS. The following is the proper way to do that.
First, install the latest free version of Font Awesome.
npm install -D #fortawesome/fontawesome-free
Add one or more of the Font Awesome CSS libraries.
app.css
#import '~#fortawesome/fontawesome-free/css/fontawesome';
#import '~#fortawesome/fontawesome-free/css/regular';
#import '~#fortawesome/fontawesome-free/css/solid';
#import '~#fortawesome/fontawesome-free/css/brands';
Then run...
npm run prod
Please reference this document.
I found decision for free version:
Install with command
npm install --save #fortawesome/fontawesome-freeI
In app.js added
require('#fortawesome/fontawesome-free/js/all.min.js');
line
With this https://fontawesome.com/icons?d=gallery&p=2&m=free acessible icons
This is what I do for font-awsome after installing it using
npm install --save #fortawesome/fontawesome-free (see https://fontawesome.com/how-to-use/on-the-web/setup/using-package-managers )
inside my resources/sass/app.scss
#import '~#fortawesome/fontawesome-free/scss/fontawesome';
#import '~#fortawesome/fontawesome-free/scss/regular';
#import '~#fortawesome/fontawesome-free/scss/solid';
#import '~#fortawesome/fontawesome-free/scss/brands';
then runing npm-run dev should make it work
In your case removing the .scss in the import might already do the trick
You can use this
#import '~font-awesome/css/font-awesome.css';.
I got this message when editing my Go project in vscode:
The Go language server is currently not supported in a multi-root set-up with different GOPATHs.
My question is: what is a "multi-root-set-up"? I do not intend to make my project "multi-root". How to avoid this message, and let the language server analyze my code?
BTW, the directory layout of my project is:
drwxrwxr-x 5 xrfang xrfang 4096 1月 21 22:33 docs
drwxrwxr-x 2 xrfang xrfang 4096 1月 21 22:33 exp
-rw-rw-r-- 1 xrfang xrfang 789 2月 3 20:52 Makefile
drwxrwxr-x 3 xrfang xrfang 4096 2月 12 22:03 pkg
drwxrwxr-x 7 xrfang xrfang 4096 1月 31 11:56 resources
drwxrwxr-x 8 xrfang xrfang 4096 2月 12 21:27 src
-rw-rw-r-- 1 xrfang xrfang 304 1月 21 22:33 TODO
-rwxrwxr-x 1 xrfang xrfang 395 1月 21 22:33 upgrade.sh
drwxrwxr-x 2 xrfang xrfang 4096 2月 12 21:28 utils
The go.mod file is in src directory. And pkg is generated by the compiler, which is quite strange, because most of my other Go project does not generate pkg in the repository folder.
If you are using modules (go.mod), try to open vscode from the directory where go.mod exists.
If you are using GOPATH with the multiple paths and your intention is to work in the GOPATH mode, that's not supported as Ian said.
I hope https://github.com/golang/vscode-go#setting-up-your-workspace provides more info.
Also, make sure to have "go.inferGopath" setting disabled. I suspect the repository has been structured to work with the GOPATH mode and append the workspace root to the GOPATH. It's possible that vscode Go plugin + gopls does not like it. :-(
The error message is referring to your GOPATH environment variable. GOPATH permits multiple paths separate by a colon, but gopls does not support that.
I have IntelliJ CE and I just imported a Go project that I cloned from GitHub. On my Mac, I have some folder organization where I group projects that I work on based on the technologies. For example., in my Projects folder on my Mac, I have the following sub folders:
- go-projects
- scala-projects
- rust-projects
- ruby-projects
So I obviously checked out the Go project in the go-projects folder which looks like this:
Joes-MacBook-Pro:go-projects joe$ ll
total 0
drwxr-xr-x 3 joe staff 102B Oct 28 07:51 bin/
drwxr-xr-x 19 joe staff 646B Oct 24 06:48 golang-restful-starter-kit/
drwxr-xr-x 3 joe staff 102B Oct 28 07:51 pkg/
drwxr-xr-x 3 joe staff 102B Oct 27 10:23 src/
And if I get into the src folder, it looks like this:
Joes-MacBook-Pro:go-projects joe$ cd src
total 0
drwxr-xr-x 6 joe staff 204B Nov 7 19:14 github.com/
Joes-MacBook-Pro:src joe$ cd github.com/
total 0
drwxr-xr-x 3 joe staff 102B Oct 28 08:20 btcsuite/
drwxr-xr-x 16 joe staff 544B Nov 7 19:16 eth-client/
drwxr-xr-x 3 joe staff 102B Oct 27 10:24 ethereum/
drwxr-xr-x 3 joe staff 102B Oct 28 07:51 tools/
Joes-MacBook-Pro:github.com joe$
Here is my Go related environment settings:
# For Go projects, we set the GOPATH
export GOROOT="/usr/local/go"
export GOPATH="/Users/joe/Projects/Private/go-projects"
export GODEPS="/Users/joe/Projects/Private/go-projects/bin/godep"
Now I import one of the Go project into IntelliJ and I get to see the following error saying that it is not able to resolve a directory as it can be seen in the screenshot below!
How can I get rid of this error? Any ideas?
I just realized that when I clone the project, I should not do a git clone but rather do:
go get -u github.com/golang/lint/golint
Not sure why this is so, but after doing this my IntelliJ was able to resolve every file on my project!
For golang projects, it's good to have Goland installed ( also a product of JetBrains )Goland Download. Moreover for the above concern you can use:
go get *the_project_to_clone*
I stuck with this problem in my project, so, I tried it with an empty test project. Here is what I do.
Create a new Cocoa application project in Xcode.
Add a new command-line tool target to it.
Add this target to the dependencies of the cocoa app.
In cocoa app target build phases add Copy files build phase, Destination = Executables, add executable product to the list.
Now Run cocoa application. No problem, application launched. Navigate app bundle in Finder, Show package contents, executable here in Contents/MacOS. This is what I expect to be.
The problem occurs when I archive cocoa application, it fails with the following error:
(null): error: /Users/prudnikov/Library/Developer/Xcode/DerivedData/TestAppWithExecutable-hiysgipuqcktgoayxrgjfrtcxubl/Build/Intermediates/ArchiveIntermediates/TestAppWithExecutable/BuildProductsPath/Release/TestAppExecutable: No such file or directory
Here is a screenshot
Here is content of this directory
prudnikov#Vladimirs-iMac ~ $ ls -al /Users/prudnikov/Library/Developer/Xcode/DerivedData/TestAppWithExecutable-hiysgipuqcktgoayxrgjfrtcxubl/Build/Intermediates/ArchiveIntermediates/TestAppWithExecutable/BuildProductsPath/Release/
total 8
drwxr-xr-x 5 prudnikov staff 170B Apr 26 21:59 ./
drwxr-xr-x# 3 prudnikov staff 102B Apr 26 21:59 ../
drwxr-xr-x 3 prudnikov staff 102B Apr 26 21:59 TestAppExecutable.dSYM/
lrwxr-xr-x 1 prudnikov staff 239B Apr 26 21:59 TestAppWithExecutable.app# -> /Users/prudnikov/Library/Developer/Xcode/DerivedData/TestAppWithExecutable-hiysgipuqcktgoayxrgjfrtcxubl/Build/Intermediates/ArchiveIntermediates/TestAppWithExecutable/InstallationBuildProductsLocation/Applications/TestAppWithExecutable.app
drwxr-xr-x 3 prudnikov staff 102B Apr 26 21:59 TestAppWithExecutable.app.dSYM/
Archiving executable — no problems. All build settings are defaults.
I've also tried to change build configuration from Debug to Release for Run action of Cocoa application scheme. It runs successfully in this case as well.
This is very strange for me. Please advice how to do it?
UPDATE: It seems that I have problem with OS. People tried the same example and it worked. Then I trien to create a new account on my Mac and do the same there and it worked as well. What global configuration can cause this?
I don't think this is an Answer but it's too long for a comment.
Check the parent directories
gdunham: ~/Library/Developer/Xcode/DerivedData$ ls -laeG /Users/gdunham/Library/Developer/Xcode/DerivedData | grep -e " \\.$"
drwxr-xr-x 31 gdunham staff 1054 Apr 15 14:29 /Users/gdunham/Library/Developer/Xcode/DerivedData
drwxr-xr-x 13 gdunham staff 442 May 1 19:56 /Users/gdunham/Library/Developer/Xcode
drwxr-xr-x 4 gdunham staff 136 Mar 8 2012 /Users/gdunham/Library/Developer/
drwx------# 66 gdunham staff 2244 Apr 2 22:43 /Users/gdunham/Library
0: group:everyone deny delete
drwxr-xr-x+ 62 gdunham staff 2108 Apr 30 14:33 /Users/gdunham
0: group:everyone deny delete
drwxr-xr-x 7 root admin 238 Feb 20 14:16 /Users
drwxr-xr-x 34 root wheel 1224 Apr 20 09:26 /
Also look at your group membership
gdunham: ~/Library/Developer/Xcode/DerivedData$ groups
staff com.apple.access_screensharing com.apple.access_screensharing-disabled everyone _appstore localaccounts _appserverusr admin _appserveradm _lpadmin _lpoperator _developer com.apple.sharepoint.group.1
I have a Bamboo instance setup to do builds with the following config:
Bamboo version = 3.0.1
when running the build, i got the following error:
09-Mar-2011 08:57:50 Pulling from repository `/root/POC/PRS' to directory '/root/bamboo-ci/xml-data/build-dir/_hg-repositories-cache/d20373e808a2d0e95a604129054231a0da36ff99'
09-Mar-2011 08:57:50 pulling from /root/POC/PRAEFECTUS
09-Mar-2011 08:57:50 searching for changes
09-Mar-2011 08:57:50 no changes found
09-Mar-2011 08:57:50 Copying repository from cache directory to source directory...
09-Mar-2011 08:57:50 Creating empty repository in directory '/root/bamboo-ci/xml-data/build-dir/PRQA-PRQAKEY-JOB1'
09-Mar-2011 08:57:50 Pulling from repository `/root/bamboo-ci/xml-data/build-dir/_hg-repositories-cache/d20373e808a2d0e95a604129054231a0da36ff99' to directory '/root/bamboo-ci/xml-data/build-dir/PRQA-PRQAKEY-JOB1'
09-Mar-2011 08:57:51 pulling from /root/bamboo-ci/xml-data/build-dir/_hg-repositories-cache/d20373e808a2d0e95a604129054231a0da36ff99
09-Mar-2011 08:57:51 requesting all changes
09-Mar-2011 08:57:51 adding changesets
09-Mar-2011 08:57:51 adding manifests
09-Mar-2011 08:57:51 adding file changes
09-Mar-2011 08:57:51 added 1 changesets with 810 changes to 810 files
09-Mar-2011 08:57:51 (run 'hg update' to get a working copy)
09-Mar-2011 08:57:52 810 files updated, 0 files merged, 0 files removed, 0 files unresolved
09-Mar-2011 08:57:52 Updated source code to revision: cc40b2d9c09ea747529887dd8db9319f53c5db4e
09-Mar-2011 08:57:52 Executing build PRQA-PRQAKEY-JOB1-2
09-Mar-2011 08:57:52 Running pre-build action: Build Number Stamper
09-Mar-2011 08:57:52 Running pre-build action: Clover Grails PreBuild Action
09-Mar-2011 08:57:52 Running pre-build action: VCS Version Collector
09-Mar-2011 08:57:52 Running pre-build action: Repository Isolation Enabler Action
09-Mar-2011 08:57:52 Running pre-build action: Maven Settings Prebuild Action
09-Mar-2011 08:57:52 Building started with ScriptBuilder
09-Mar-2011 08:57:52
Starting to build 'PRAEFECTUS-QA - PRQA-PLAN - Default Job'
... running command line: /bin/sh Makefile
... in : /root/bamboo-ci/xml-data/build-dir/PRQA-PRQAKEY-JOB1
09-Mar-2011 08:57:52 Makefile: 10: PYTHON: not found
but if we look at the folder listed in the error, the Makefile is there
root#bambooserver:~/bamboo-ci/xml-data/build-dir/PRQA-PRQAKEY-JOB1# ls -l
total 104
-rw-r--r-- 1 root root 45 2011-03-09 08:57 AUTHORS
drwxr-xr-x 2 root root 4096 2011-03-09 08:57 bin
-rw-r--r-- 1 root root 138 2011-03-09 08:57 build-number.txt
-rw-r--r-- 1 root root 120 2011-03-09 08:57 CHANGES
-rwxr-xr-x 1 root root 9703 2011-03-09 08:57 ez_setup.py
drwxr-xr-x 2 root root 4096 2011-03-09 08:57 images
drwxr-xr-x 2 root root 4096 2011-03-09 08:57 init.d
drwxr-xr-x 5 root root 4096 2011-03-09 08:57 iped
drwxr-xr-x 2 root root 4096 2011-03-09 08:57 logrotate.d
-rw-r--r-- 1 root root 932 2011-03-09 08:57 Makefile
-rw-r--r-- 1 root root 175 2011-03-09 08:57 MANIFEST.in
drwxr-xr-x 2 root root 4096 2011-03-09 08:57 nbproject
-rw-r--r-- 1 root root 1109 2011-03-09 08:57 NEWS
drwxr-xr-x 5 root root 4096 2011-03-09 08:57 prs
drwxr-xr-x 3 root root 4096 2011-03-09 08:57 rpa
drwxr-xr-x 2 root root 4096 2011-03-09 08:57 sbin
drwxr-xr-x 4 root root 4096 2011-03-09 08:57 scripts
-rw-r--r-- 1 root root 81 2011-03-09 08:57 setup.cfg
-rwxr-xr-x 1 root root 2796 2011-03-09 08:57 setup.py
drwxr-xr-x 2 root root 4096 2011-03-09 08:57 src
drwxr-xr-x 7 root root 4096 2011-03-09 08:57 test
drwxr-xr-x 5 root root 4096 2011-03-09 08:57 tests
-rw-r--r-- 1 root root 501 2011-03-09 08:57 TODO
-rw-r--r-- 1 root root 6 2011-03-09 08:57 VERSION
root#bambooserver:~/bamboo-ci/xml-data/build-dir/PRQA-PRQAKEY-JOB1#
any tips on how to setup a Job in Bamboo ? i am using Mercurial and project is in Python.
As I can see you've used a ScriptBuilder which is dedicated to running a shell script while you probably need a builder that runs a command
make
What you need to do is:
go to Administration / Server Capabilities
in "Add Capability" select: Capability Type: Builder, Type: Command, Builder Label: Make, Path: enter the full path to your make utility (ie. /usr/bin/make)
now navigate to your plan configuration and change the builder to "Make"
After those changes your build should be working fine.
PS.
In case of future problems you should try reporting the problem on Atlassian's support site (http://support.atlassian.com)
Disclaimer: yes I work for Atlassian