question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

build:css NOT working

See original GitHub issue

I’m using following code in my source HTML file:

<!-- build:css styles/vendor.css -->

    <link rel="stylesheet" href="styles/lib/stylesheet-1.css">

    <link rel="stylesheet" href="styles/lib/stylesheet-2.css">

    <link rel="stylesheet" href="styles/lib/stylesheet-3.css">

<!-- endbuild -->

But after compiling it is not concatenating, it creates vendor.css file but links to css files remains same instead of pointing to vendor.css, what could be the issue.

On the other hand build:js working just as expected. I’m using Gulp Web App Generator with 1.3.0 version of useref.

UPDATE: My header.html which contains this links to css files is not located in root app folder but it is in app/partials/ folder.

UPDATE#2: On second try it doesn’t seems to be subfolder issue either. I tried embedding these links in footer.html file which is located in same app/partials/ folder. But now in this file it’s working just fine. What could be the problem with header.html file? I tried stripping this file code to minimum to isolate any issue but in vain.

UPDATE#3: Here are contents of my app/partials/header.html and app/partials/footer.html, <link> and <script> tags work in footer.html but not in header.html.

header.html

` <!doctype html>

<html class="no-js">
<head>
    <title>pageTitle</title>

    <!-- build:css styles/vendor.css -->
    <link rel="stylesheet" href="styles/lib/royalslider.css">
    <link rel="stylesheet" href="styles/lib/rs-default.css">
    <link rel="stylesheet" href="styles/lib/rs-minimal-white.css">
    <link rel="stylesheet" href="styles/lib/font-awesome.min.css">
    <link rel="stylesheet" href="/bower_components/slidebars/dist/slidebars.css">
    <link rel="stylesheet" href="/bower_components/magnific-popup/dist/magnific-popup.css">
    <!-- endbuild -->

    <!-- build:css styles/main.css -->
    <link rel="stylesheet" href="styles/main.css">
    <!-- endbuild -->

    <!-- build:js scripts/vendor/modernizr.js -->
    <script src="/bower_components/modernizr/modernizr.js"></script>
    <!-- endbuild -->


</head>

<body>

`

footer.html

<!-- build:js scripts/plugins.js -->

<script src="/bower_components/jquery/dist/jquery.js"></script>
<script src="/bower_components/foundation/js/foundation.js"></script>
<script src="/bower_components/superfish/dist/js/superfish.js"></script>
<script src="/bower_components/masonry/dist/masonry.pkgd.js"></script>
<script src="/bower_components/magnific-popup/dist/jquery.magnific-popup.js"></script>
<script src="/bower_components/backgroundCheck/background-check.js"></script>
<script src="/bower_components/imagesloaded/imagesloaded.pkgd.js"></script>
<script src="/bower_components/jquery-validate/dist/jquery.validate.js"></script>
<script src="/bower_components/slidebars/dist/slidebars.js"></script>
<script src="scripts/lib/royalslider.min.js"></script>
<script src="scripts/lib/smoothscroll.js"></script>

<!-- endbuild -->

<!-- build:js scripts/main.js -->
<script src="scripts/main.js"></script>
<!-- endbuild -->

</body></html>`

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

10reactions
royscheepenscommented, Sep 21, 2015

I was having the exact same issue described as above, and found out it was caused by Unix style line endings on my header.html file. Changing header.html to Windows style (CRLF) line endings fixed the issue.

5reactions
ghostcommented, Nov 26, 2015

+1 the link tag was being separated onto two lines by my editor.

bad

<link rel="stylesheet"
      href="style.css">

good

<link rel="stylesheet" href="style.css">
Read more comments on GitHub >

github_iconTop Results From Across the Web

"npm run build:css " can not work, while it is ok when I run the ...
The reason node-sass runs successfully in the terminal might be because it's running from a different (probably global) installation. Run which ...
Read more >
yarn build:css issues after update [#3055792] | Drupal.org
After a composer update drupal/claro 1.x-dev I got the following error when running yarn build:css [Not sure it is linked to the composer ......
Read more >
RE: Theme build stopped working suddenly - Forums - Liferay
Our custom theme gradle build was working fine till yesterday. It has stopped working from today without any configuration change from our end....
Read more >
Post-build event fails when parentheses in Windows profile ...
I'm having the same problem that is discussed in this issue: ... 1> Task "Exec" 1> npm run buildcss 1> 'C:\Users\JeffLinacre' is not...
Read more >
CSS Builder Gradle Plugin - Liferay Help Center
The buildCSS task is automatically configured with sensible defaults, ... If you're using an IBM JDK, you may experience issues when building your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found