-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
Version
1.9.0
Reproduction link
Operating System
Mac Osx BigSur
Device
MacBook Pro 15 retina
Browser & Version
Chrome latest
Steps to reproduce
Running the the app in a dockerized container
then I get this error:
Failed to compile.
./src/assets/scss/material-dashboard-pro-react.scss (./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-6-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--5-oneOf-6-3!./node_modules/sass-loader/dist/cjs.js??ref--5-oneOf-6-4!./src/assets/scss/material-dashboard-pro-react.scss)
To import Sass files, you first need to install node-sass.
Run npm install node-sass or yarn add node-sass inside your workspace.
What is expected?
The React app runs in the docker environment
What is actually happening?
The compile process results to fail
Solution
My Dockerile looks like this
FROM node:10
Create app directory
WORKDIR /app
COPY package*.json ./
COPY . .
RUN npm install
RUN npm rebuild node-sass
RUN npm run build
EXPOSE 3000
CMD ["npm", "start" ]