Skip to content
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

Can't make the migration from CLI to run #243

Closed
abnersouza opened this issue Jan 30, 2018 · 4 comments
Closed

Can't make the migration from CLI to run #243

abnersouza opened this issue Jan 30, 2018 · 4 comments

Comments

@abnersouza
Copy link

Hi guys,

First time using the nx, i have a project using angular latest 5.2.2 and cli 1.6.5, using SCSS.

I follow the guide on how to migrate from CLI to Nx, but for some reason the scss is looking for the wrong place now and I cant run the application anymore.

screen shot 2018-01-30 at 11 10 02

You can see from the pic that is trying to find the font-awesome and others inside the ./apps/host/node_modules I think maybe is because of the root.

am I missing something here?

Thanks a lot

@abnersouza
Copy link
Author

abnersouza commented Jan 30, 2018

The ng generate is not setting the correct path to the styles in the angular-cli file.

Here the paths set by the convert, scripts are correct:

"styles": [
    "../node_modules/normalize.css/normalize.css",
    "../node_modules/font-awesome/scss/font-awesome.scss",
    "../node_modules/bootstrap/scss/bootstrap.scss",
    "./app/theme/theme.scss",
    "styles.scss"
  ],
 "scripts": [
    "../../../node_modules/jquery/dist/jquery.min.js",
    "../../../node_modules/jquery-slimscroll/jquery.slimscroll.js",
    "../../../node_modules/bootstrap/dist/js/bootstrap.bundle.js"
  ]

To make it work i had to set:

"styles": [
"../../../node_modules/normalize.css/normalize.css",
"../../../node_modules/font-awesome/scss/font-awesome.scss",
"../../../node_modules/bootstrap/scss/bootstrap.scss",
"./app/theme/theme.scss",
"styles.scss"
]

@phl3x0r
Copy link

phl3x0r commented Feb 5, 2018

That's because the paths are relative to the location of the tsconfig.app.json file that you are using.

@vsavkin
Copy link
Member

vsavkin commented Apr 25, 2018

Thank you for submitting the issue. This is a known limitation (see here: #132.), which we need to address. Currently you have to update the paths manually.

@vsavkin vsavkin closed this as completed Apr 25, 2018
@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants