SassError: Invalid CSS after

Hi, I was deploying my react app but there was an error which I don’t know, does anyone have an idea? I don’t have yarn in this folder.

9:04:38 PM: $ npm run build

9:04:39 PM: > airbnb-frontend@0.1.0 build /opt/build/repo

9:04:39 PM: > react-scripts build

9:04:40 PM: Creating an optimized production build...

9:05:49 PM: Failed to compile.

9:05:49 PM:

9:05:49 PM: ./src/app.scss

9:05:49 PM: SassError: Invalid CSS after "i": expected 1 selector or at-rule, was 'import React from "'

9:05:49 PM: on line 1 of src/pages/Home/Home.js

9:05:49 PM: from line 8 of /opt/build/repo/src/app.scss

9:05:49 PM: >> import React from "react";

9:05:49 PM: ^

9:05:49 PM: npm ERR! code ELIFECYCLE

9:05:49 PM: npm ERR! errno 1

9:05:49 PM: npm ERR! airbnb-frontend@0.1.0 build: `react-scripts build`

9:05:49 PM: npm ERR! Exit status 1

9:05:49 PM: npm ERR!

9:05:49 PM: npm ERR! Failed at the airbnb-frontend@0.1.0 build script.

9:05:49 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

9:05:49 PM: npm ERR! A complete log of this run can be found in:

9:05:49 PM: npm ERR! /opt/buildhome/.npm/_logs/2020-09-10T01_05_49_915Z-debug.log

9:05:49 PM: ​

9:05:49 PM: ┌─────────────────────────────┐

9:05:49 PM: │ "build.command" failed │

9:05:49 PM: └─────────────────────────────┘

9:05:49 PM: ​

9:05:49 PM: Error message

9:05:49 PM: Command failed with exit code 1: npm run build

9:05:49 PM: ​

9:05:49 PM: Error location

9:05:49 PM: In Build command from Netlify app:

9:05:49 PM: npm run build

9:05:49 PM: ​

9:05:49 PM: Resolved config

9:05:49 PM: build:

9:05:49 PM: command: npm run build

9:05:49 PM: commandOrigin: ui

9:05:49 PM: publish: /opt/build/repo/build

9:05:50 PM: Caching artifacts

9:05:50 PM: Started saving node modules

9:05:50 PM: Finished saving node modules

9:05:50 PM: Started saving build plugins

9:05:50 PM: Finished saving build plugins

9:05:50 PM: Started saving pip cache

9:05:50 PM: Finished saving pip cache

9:05:50 PM: Started saving emacs cask dependencies

9:05:50 PM: Finished saving emacs cask dependencies

9:05:50 PM: Started saving maven dependencies

9:05:50 PM: Finished saving maven dependencies

9:05:50 PM: Started saving boot dependencies

9:05:50 PM: Finished saving boot dependencies

9:05:50 PM: Started saving go dependencies

9:05:50 PM: Finished saving go dependencies

9:05:53 PM: Error running command: Build script returned non-zero exit code: 1

9:05:53 PM: Failing build: Failed to build site

9:05:53 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1

9:05:53 PM: Finished processing build request in 2m4.297610605s

Hi Ian and sorry to hear about the trouble!

Seems like you have some javascript in your SCSS file which I don’t think is valid - does this project build locally?

I merged every SCSS files into an index.scss and it works. Thanks. but how can I deploy multiple pages? I can only see the index page…! https://confident-williams-d117ab.netlify.app/ as you can see, index page is okay but when you click the image it shows page not found…

Our staff won’t be able to help with that question - we can’t consult on your source code - but hopefully another customer in the community can, so you might want to specify more details about what you’re trying to accomplish and how, so they can better advise you :slight_smile: