Coder Social home page Coder Social logo

Comments (5)

nunhes avatar nunhes commented on May 2, 2024

I followed the lead in the official documentation and still get this error. If you import everything works but not when you want to work with selected style sheets :(

from examples.

julien-deramond avatar julien-deramond commented on May 2, 2024

Could you provide more detail regarding your env?
It seems to work pretty well from https://github.com/twbs/examples/tree/main/parcel:

git clone https://github.com/twbs/examples.git
cd examples/parcel/
npm install
npm start

where style.scss loads Bootstrap by selecting Sass files.

from examples.

filips123 avatar filips123 commented on May 2, 2024

I have the same problem. Running the same commands causes this error:

> [email protected] start
> parcel serve src/index.html --public-url / --dist-dir dist

Server running at http://localhost:1234
× Build failed.

@parcel/transformer-sass: Can't find stylesheet to import.
   ╷
34 │ @import "bootstrap/scss/functions";
   │         ^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
  src\scss\styles.scss 34:9  root stylesheet

  Error: Can't find stylesheet to import.
     ╷
  34 │ @import "bootstrap/scss/functions";
     │         ^^^^^^^^^^^^^^^^^^^^^^^^^^
     ╵
    src\scss\styles.scss 34:9  root stylesheet
      at Object.wrapException (C:\Users\filips\AppData\Local\Temp\examples\parcel\node_modules\sass\sass.dart.js:1252:43)
      at C:\Users\filips\AppData\Local\Temp\examples\parcel\node_modules\sass\sass.dart.js:81805:25
      at _wrapJsFunctionForAsync_closure.$protected (C:\Users\filips\AppData\Local\Temp\examples\parcel\node_modules\sass\sass.dart.js:4022:15)
      at _wrapJsFunctionForAsync_closure.call$2 (C:\Users\filips\AppData\Local\Temp\examples\parcel\node_modules\sass\sass.dart.js:33914:12)
      at _awaitOnObject_closure.call$1 (C:\Users\filips\AppData\Local\Temp\examples\parcel\node_modules\sass\sass.dart.js:33902:32)
      at Object._rootRunUnary (C:\Users\filips\AppData\Local\Temp\examples\parcel\node_modules\sass\sass.dart.js:4408:18)
      at StaticClosure.<anonymous> (C:\Users\filips\AppData\Local\Temp\examples\parcel\node_modules\sass\sass.dart.js:115526:16)
      at _CustomZone.runUnary$2$2 (C:\Users\filips\AppData\Local\Temp\examples\parcel\node_modules\sass\sass.dart.js:35338:39)
      at _Future__propagateToListeners_handleValueCallback.call$0 (C:\Users\filips\AppData\Local\Temp\examples\parcel\node_modules\sass\sass.dart.js:34401:51)
      at Object._Future__propagateToListeners (C:\Users\filips\AppData\Local\Temp\examples\parcel\node_modules\sass\sass.dart.js:4201:93)

The same happens with npm run build.

Maybe it is Windows-specific error?

Also, it seems that prefixing filenames with _ fixes the issue (at least for a few files I tried), but this is still unexpected and not documented anywhere.

from examples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.