Skip to content

Error: set the style to scss #4092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sh107 opened this issue Jan 18, 2017 · 3 comments
Closed

Error: set the style to scss #4092

sh107 opened this issue Jan 18, 2017 · 3 comments

Comments

@sh107
Copy link

sh107 commented Jan 18, 2017

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Mac Sierra

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

                         _                           _  _

__ _ _ __ __ _ _ _ | | __ _ _ __ ___ | |()
/ || '_ \ / _ || | | || | / ` || '|___ / __|| || |
| (
| || | | || (
| || |
| || || (| || | |___|| ( | || |
_
,||| || _, | _,||| _,||| _|||||
|
_/
angular-cli: 1.0.0-beta.25.5
node: 7.2.1
os: darwin x64
@angular/common: 2.4.3
@angular/compiler: 2.4.3
@angular/core: 2.4.3
@angular/forms: 2.4.3
@angular/http: 2.4.3
@angular/material: 2.0.0-beta.1
@angular/platform-browser: 2.4.3
@angular/platform-browser-dynamic: 2.4.3
@angular/router: 3.4.3
@angular/compiler-cli: 2.4.3

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

I tried to change the style from css to scss using the following command

ng set defaults.styleExt scss

This gives the following error by running "ng serve"

The log given by the failure.

Normally this include a stack trace and some more information.

Path must be a string. Received { source: 'environments/environment.ts',
dev: 'environments/environment.ts',
prod: 'environments/environment.prod.ts' }
TypeError: Path must be a string. Received { source: 'environments/environment.ts',
dev: 'environments/environment.ts',
prod: 'environments/environment.prod.ts' }
at assertPath (path.js:7:11)
at Object.resolve (path.js:1146:7)
at Object.getWebpackCommonConfig (/Users/sijinhe/WebstormProjects/ng2-phenomenal-portal/node_modules/angular-cli/models/webpack-build-common.js:102:25)
at new NgCliWebpackConfig (/Users/sijinhe/WebstormProjects/ng2-phenomenal-portal/node_modules/angular-cli/models/webpack-config.js:24:49)
at Class.run (/Users/sijinhe/WebstormProjects/ng2-phenomenal-portal/node_modules/angular-cli/tasks/serve-webpack.js:23:22)
at /Users/sijinhe/WebstormProjects/ng2-phenomenal-portal/node_modules/angular-cli/commands/serve.run.js:37:22
at process._tickCallback (internal/process/next_tick.js:103:7)

Mention any other details that might be useful.

I changed the angular-cli.json back to its original setting.
It now comes back to work. There must be something wrong happening using the command "ng set defaults.styleExt scss"


Thanks! We'll be in touch soon.

@beeman
Copy link
Contributor

beeman commented Jan 18, 2017

@sh107 issue confirmed.

To manually switch to using scss please update the value of defaults.styleExt to scss in angular-cli.json.

@filipesilva
Copy link
Contributor

Dupe of #4044

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants