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

When create with --sass, npm build does work, main.js is missing. #44

Closed
Cybermage83 opened this issue Aug 13, 2017 · 8 comments
Closed
Labels

Comments

@Cybermage83
Copy link

Cybermage83 commented Aug 13, 2017

94% asset optimization
100%
mv: no such file or directory: .../build/static/main.js
Done: 9662.041ms

Couldn't parse bundle asset "...\build\static\main.js".
Analyzer will use module sizes from stats file.

Webpack Bundle Analyzer saved report to ...\build\static\report.html

Something is wrong when sass project is created..
Dev server and portal work just fine. @supnate Suggestions?

@supnate
Copy link
Owner

supnate commented Aug 14, 2017

Thanks @Cybermage83 for reporting this. It's not an error but a case not well handled. Don't need to worry about it. I will remove the error msg in the next release.

@supnate supnate added the bug label Aug 14, 2017
@Cybermage83
Copy link
Author

Cybermage83 commented Aug 15, 2017

Just did true webpack build, got this error, which is probably why i am not generating the main.js

[./index.js] ./index.js 1.75 kB {0} [built]
+ 620 hidden modules

ERROR in multi babel-polyfill ./styles/index.scss ./index
Module not found: Error: Can't resolve 'less-loader' in '...\src'
@ multi babel-polyfill ./styles/index.scss ./index

Less loader??

@supnate
Copy link
Owner

supnate commented Aug 15, 2017

There should be no less-loader in webpack-config.js. Could you check?

@Cybermage83
Copy link
Author

there was one on scss rule, as a final fall back.
also, i got it work, but i had to create a new non functional webpack.config.js and then run webpack to generate main.js after that i could to npm build so that timestamp can be assigned.

I am on windows machine, I don;t know if it matters, but something is weird going for a sass build

@Cybermage83
Copy link
Author

OKie it looks like i found the real culprit >>
loader: isDev ? 'style-loader!css-loader?sourceMap!sass-loader?sourceMap'
: 'style-loader!css-loader!less-loader'

Right here... definitely need a fix here heh

@supnate
Copy link
Owner

supnate commented Aug 15, 2017

I did find an error in the generated sass project. In webapck-config.js there's a less-loader for scss files, it should be sass-loader:

{
test: /.scss$/,
loader: isDev ? 'style-loader!css-loader?sourceMap!sass-loader?sourceMap'
: 'style-loader!css-loader!sass-loader'
}

I've not found why it just works on my machine, will investigate.

@Cybermage83
Copy link
Author

cool, glad we got that figured out. Thanks.

@supnate
Copy link
Owner

supnate commented Aug 22, 2017

The bug was fixed in the latest 2.0.6 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants