-
Notifications
You must be signed in to change notification settings - Fork 12k
ng build --prod: Cannot find module css-loader/index.js?sourcemap&minimize #4292
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
Comments
The fix suggested above didn't work for me on 1.0.0-beta.21, I continue to see the following cannot find module css-loader |
|
steps "devDependencies": { |
extract-text-webpack-plugin is upgraded to 2.0.0-rc.2. |
after "double" npm install I've got nprm error I fixed all dependencies by specifying these dependencies explicitly: {
"@ngtools/webpack": "1.1.5",
"extract-text-webpack-plugin": "2.0.0-beta.5",
"webpack": "2.1.0-beta.25",
"loader-runner": "2.2.0",
"tsickle": "0.2.4",
"source-map-support": "0.4.10"
} most important are Note: I've digged these dependencies from cli-beta.21 |
The "ng build --prod" works for me now with the list posted by castamir above, thanks for everyone in this thread. { NOTE: I didn't have to even install angular-cli on my npm, but I am just declaring it in the package.json as shown above. I uninstalled my angular cli using "npm uninstall -g angular-cli" and "npm cache clean". Now I am able to build prod using package.json script task itself that runs the angular-cli based build with in the local confines of package.json and not at global level installed angular-cli.
|
All the solutions above doesn't work for me.
But
After I run rm -rf node_modules/.2.0.0-rc.3@extract-text-webpack-plugin And re-build production again, it works. node version: 6.2.0 |
make a fresh new |
Can anyone from angular-cli DEV community please comment if there are any plans for this to be fixed on the newer version so that we don't have to use this hack with older version? I see the same issue happening even with "@angular/cli": "1.0.0-beta.29". Is this already fixed with #4435 ? I also see something relevant at http://stackoverflow.com/questions/42076879/fallbackloader-option-has-been-deprecated-replace-with-fallback |
+1 |
+1 |
+1 |
+1 |
With @angular/cli: 1.0.0-rc.1, I see this is now fixed. Just create a new project out of RC1 version and try to use the generated package.json and it should work. Pasted my package.json below and this works now. I dont see the issue anymore. I was referring #4435 and understood that they have taken care of this in beta 31 fix itself. "dependencies": { |
@itsforbabu Thanks |
https://www.npmjs.com/package/@angular/cli npm uninstall -g angular-cli
npm cache clear
npm install -g @angular/cli@latest |
Closing as fixed in latest releases. |
Why not publish under angular-cli as usual? |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Uh oh!
There was an error while loading. Please reload this page.
Versions.
Repro steps.
The log given by the failure.
Mention any other details that might be useful.
Well actually I found the reason and the fix (it just for the record if anyone has the same issue...):
In [email protected] / package.json this following line:
Resolved to different incompatible extract-text-webpack-plugin version:
25 jan. 17
Changed to:
30 jan. 17
Solution
Do a
npm shrinkwrap
but if it's too late, add the following line to yourpackage.json
:Another problem
After fixing this you may get a lodash error:
change the dependency to
make sure you don't take the v4.14.51
ps: Don't forget to delete you node_modules and run
npm cache clean
beforenpm install
The text was updated successfully, but these errors were encountered: