twbs / bootstrap-npm-starter

Starter template for new building with Bootstrap 4 in npm projects.
MIT License
1.23k stars 465 forks source link

branch: v5-parcel -- @parcel/transformer-sass: Can't find stylesheet to import @import "vendor/rfs"; #70

Closed stepheneb closed 2 years ago

stepheneb commented 3 years ago

Wanted to checkout the v5-parcel branch.

Running npm start generates an error: @parcel/transformer-sass: Can't find stylesheet to import @import "vendor/rfs";

Possibly a related issue: https://github.com/parcel-bundler/parcel/issues/4609

Shell:

[bootstrap-npm-starter (v5-parcel)]$ git show --name-status
commit e51ef9043a87542b6591a1a3df5bcf6f4731f0b5 (HEAD -> v5-parcel, origin/v5-parcel)
Author: XhmikosR <xhmikosr@gmail.com>
Date:   Wed Sep 1 09:10:32 2021 +0300

    Add rimraf

M       package.json
[bootstrap-npm-starter (v5-parcel)]$ git status
On branch v5-parcel
Your branch is up to date with 'origin/v5-parcel'.

nothing to commit, working tree clean

[bootstrap-npm-starter (v5-parcel)]$ rm -rf .parcel-cache/
[bootstrap-npm-starter (v5-parcel)]$ rm -rf node_modules/
[bootstrap-npm-starter (v5-parcel)]$ node -v
v14.17.6
[bootstrap-npm-starter (v5-parcel)]$ npm -v
6.14.15
[bootstrap-npm-starter (v5-parcel)]$ npm install

> @parcel/watcher@2.0.0-alpha.10 install /Users/stephen/dev/bootstrap-npm-starter/node_modules/@parcel/watcher
> node-gyp-build

> msgpackr-extract@1.0.13 install /Users/stephen/dev/bootstrap-npm-starter/node_modules/msgpackr-extract
> node-gyp-build

> lmdb-store@1.6.6 install /Users/stephen/dev/bootstrap-npm-starter/node_modules/lmdb-store
> node-gyp-build

> core-js@3.16.4 postinstall /Users/stephen/dev/bootstrap-npm-starter/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

> ejs@2.7.4 postinstall /Users/stephen/dev/bootstrap-npm-starter/node_modules/ejs
> node ./postinstall.js

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)

added 1132 packages from 934 contributors and audited 1135 packages in 19.985s

180 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

[bootstrap-npm-starter (v5-parcel)]$ npm start

> bootstrap-npm-starter@1.4.0 start /Users/stephen/dev/bootstrap-npm-starter
> parcel serve ./src/index.html

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

@parcel/transformer-sass: Can't find stylesheet to import.
  β•·
6 β”‚ @import "vendor/rfs";
  β”‚         ^^^^^^^^^^^^
  β•΅
  file:/Users/stephen/dev/bootstrap-npm-starter/node_modules/bootstrap/scss/_mixins.scss 6:9  @import
  src/starter.scss 42:9                                                                                               root stylesheet

  Error: Can't find stylesheet to import.
  β•·
  6 β”‚ @import "vendor/rfs";
  β”‚         ^^^^^^^^^^^^
  β•΅
  file:/Users/stephen/dev/bootstrap-npm-starter/node_modules/bootstrap/scss/_mixins.scss 6:9  @import
  src/starter.scss 42:9                                                                                               root stylesheet
  at Object._newRenderError (/Users/stephen/dev/bootstrap-npm-starter/node_modules/sass/sass.dart.js:13319:19)
  at Object._wrapException (/Users/stephen/dev/bootstrap-npm-starter/node_modules/sass/sass.dart.js:13139:16)
  at _render_closure1.call$2 (/Users/stephen/dev/bootstrap-npm-starter/node_modules/sass/sass.dart.js:82377:21)
  at _RootZone.runBinary$3$3 (/Users/stephen/dev/bootstrap-npm-starter/node_modules/sass/sass.dart.js:27674:18)
  at _FutureListener.handleError$1 (/Users/stephen/dev/bootstrap-npm-starter/node_modules/sass/sass.dart.js:26223:19)
  at _Future__propagateToListeners_handleError.call$0
  (/Users/stephen/dev/bootstrap-npm-starter/node_modules/sass/sass.dart.js:26521:49)
  at Object._Future__propagateToListeners (/Users/stephen/dev/bootstrap-npm-starter/node_modules/sass/sass.dart.js:4546:77)
  at _Future._completeError$2 (/Users/stephen/dev/bootstrap-npm-starter/node_modules/sass/sass.dart.js:26353:9)
  at _AsyncAwaitCompleter.completeError$2 (/Users/stephen/dev/bootstrap-npm-starter/node_modules/sass/sass.dart.js:26007:12)
  at Object._asyncRethrow (/Users/stephen/dev/bootstrap-npm-starter/node_modules/sass/sass.dart.js:4345:17)
s1awek commented 2 years ago

I had exactly the same problem, only thing that worked for me was changing @import "vendor/rfs"; to @import "../../../../node_modules/bootstrap/scss/vendor/rfs"; in src/sass/assets/bootstrap5/_mixins.scss