Next.js Discord

Discord Forum

Cannot import scss bootstrap file from node modules into custom scss file

Unanswered
Morelet’s Crocodile posted this in #help-forum
Open in Discord
Morelet’s CrocodileOP
I am trying to import bootstrap scss file from node modules into a custom scss file to override some variables but i am unable to do so because it gives me error of unable to find module.
I have tries to install it using --dev flag and i've also used transpiled packages but nothing worked
/** @type {import('next').NextConfig} */
const nextConfig = {
  transpilePackages: ['@acme/ui', 'lodash-es'],
}
 
module.exports = nextConfig

4 Replies

Morelet’s CrocodileOP
i have scss files like this and also scss file i am trying to import is in node modules. How do i specify __dirname?
Cape horse mackerel
import path from 'path'