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

copy-webpack-plugin] unable to locate './node_modules/swagger-ui/dist/css #184

Closed
koyaja opened this issue Aug 4, 2017 · 7 comments

Comments

@koyaja
Copy link

commented Aug 4, 2017

I tried to integrate the project in my project, it does not take the appearance of the theme of ng2-admin and I have this error
`ERROR in [copy-webpack-plugin] unable to locate './node_modules/swagger-ui/dist/css' at 'C:\Users\SOFT IT\Documents\GitHub\HotMan\node_modules\swagger-ui\dist\css'

ERROR in [copy-webpack-plugin] unable to locate './node_modules/swagger-ui/dist/lib' at 'C:\Users\SOFT IT\Documents\GitHub\HotMan\node_modules\swagger-ui\dist\lib'

ERROR in [copy-webpack-plugin] unable to locate './node_modules/swagger-ui/dist/swagger-ui.min.js' at 'C:\Users\SOFT IT\Documents\GitHub\HotMan\node_modules\swagger-ui\dist\swagger-u
i.min.js'`

@dancancro

This comment has been minimized.

Copy link
Owner

commented Aug 5, 2017

I've been grappling with what to do about themes and styles for a while now. I want this to emulate a real app. So it probably shouldn't have ten different css libraries and themes. But it would also be nice if things looked in this project the way they look in the source projects.

I recently took a position on it and decided to try to use only one theme for the whole application and let the parts not look exactly the way they do in the source projects, at least without redoing things to make them look the same. Function trumps form until I get better as sass modularization.

So if you're using a recent copy and the blue ng2-admin background isn't there, then this is why. It was looking like a big deal to support multiple sets of global style rules each for a different screen of the app.

I came across the swagger-ui problem and thought I fixed it. I didn't get that error before pushing to the master branch. In any event, I see a change in the "meals" branch that handled it. Look at this part of webpack.common.js

// { from: './node_modules/swagger-ui/dist/css', to: 'swagger-ui/dist/
// { from: './node_modules/swagger-ui/dist/lib', to: 'swagger-ui/dist/lib' },
// { from: './node_modules/swagger-ui/dist/swagger-ui.min.js', to: 'swagger-ui/dist/swagger-ui.min.
{ from: './node_modules/swagger-ui/dist/swagger-ui.css', to: 'swagger-ui/dist/swagger-ui.
{ from: './node_modules/swagger-ui/dist/swagger-ui.js', to: 'swagger-ui/dist/swagger-ui.js' },

You just need to look into your node_modules directory and fix the paths a little.

@koyaja

This comment has been minimized.

Copy link
Author

commented Aug 5, 2017

Thanks i solved the problem swagger, now how i give the appearance of ng2-admin despite that i put

<main baThemeRun>
<jhi-page-ribbon></jhi-page-ribbon>
<div>
    <router-outlet name="navbar"></router-outlet>
</div>
<div class="container-fluid">
    <div class="card jh-card">
        <router-outlet></router-outlet>
        <router-outlet name="popup"></router-outlet>
    </div>
    <jhi-footer></jhi-footer>
</div>
</main
```>`
@dancancro

This comment has been minimized.

Copy link
Owner

commented Aug 5, 2017

It has all to do with styles, not the main component template. If you set global style to make the dashboard page look like it does in ng2-admin, then the rest of the application will be affected and have white text on white background and whatnot. So, you'll need to play with styles more than I was willing to play with styles in order to get everything to work right.

@koyaja

This comment has been minimized.

Copy link
Author

commented Aug 5, 2017

thank I will play on the style if it does not work I come back to you I have to import @import 'conf/conf'; in my gloale.scss but it does not work

@dancancro dancancro closed this Aug 5, 2017

@satishpatro44

This comment has been minimized.

Copy link

commented Nov 21, 2018

I checked the webpack-common.js
new CopyWebpackPlugin( [ { from: './node_modules/swagger-ui/dist/css', to: 'swagger-ui/dist/css' }, { from: './node_modules/swagger-ui/dist/lib', to: 'swagger-ui/dist/lib' }...
And I checked github of swagger-ui, there is no folder of css & lib in swagger-ui/dist

@satishpatro44

This comment has been minimized.

Copy link

commented Nov 21, 2018

@dancancro look at this

@Caltalys

This comment has been minimized.

Copy link

commented Jun 28, 2019

You can downgrade swagger-ui dependency from 3.22 to 2.2.10. It's ok with me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.