-
Notifications
You must be signed in to change notification settings - Fork 12k
Error : ng build -prod => The Broccoli Plugin: [BundlePlugin] failed #718
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
We have solve the problem by init all project :-) |
Same here. Nothing helps. without
Have tried remove node_modules dist tmp folders, While without
|
Is this a known issue? |
Yes, I can also reproduce this with beta 4. ng build works fine whereas ng build -prod gives [BundlePlugin] error, so this issue should probably be opened again. |
Same problem with the newest rc1 |
Facing the same issue.. +1 Build failed. |
You get this error only when you change the default ng-cli structure . Hope this can help to slove it. |
I left the original structure alone and it does not work :( my main.ts is under projectname/frontend/src/maint.ts and underneath src there is /app. That is how the ng init created the structure. I might moved the whole folder around, but that should not be a problem, right? |
can you make it projectname/src/maint.ts if you want to compile it to a different location "ng build -prod --output-path dist/frontend-app" |
@ifaouibadi I have kept the original structure and it doesn't work :) |
Same problem is happening for me too. I've not changed the structure, the only thing I've done is added angular2-google-maps. It works fine when just using build but the -prod flag gives the error of
|
This seems to be #847 (comment), isn't it? |
The version I'm using already has those changes |
Same issue with angular2-material :
|
I've found many issues regarding build failing with |
I still have the same issue with RC1. Why is this closed?
angular-cli: 1.0.0-beta.5 |
@datrinh this issue is closed because it was already solved and the solution was found. In your case, it looks like you upgraded a project, see #847 (comment) . |
Seemingly the same issue here. angular-cli: 1.0.0-beta.5
|
|
Thnx. I deleted tmp and dist. You gave me an idea to test: I'll try to remove theinternal packages. `/***********************************************************************************************
/** User packages configuration. */ ////////////////////////////////////////////////////////////////////////////////////////////////
const cliSystemConfigPackages: any = { /** Type declaration for ambient System. */ // Apply the CLI SystemJS configuration. // Apply the user's configuration. |
I removed the internal packages (I referenced them by 'changedName' above). |
Just installed angular-cli 2 days ago and have the same/similar problem Error on fetch for app/models/IArtist.js at file:///C:/Data/PlayMeExtension/tmp/bundle_plugin-input_base_path-VZeniFqQ.tmp/0/app/models/IArtist.js However, IArtist is a definition file (IArtist.d.ts) - i wonder if that has something to do with it? build without -prod works file |
I had a lot of problems with the prod built. My angular-cli project was built with beta 4 and the first thing I did was to migrate all the blueprinted-files manually. Since I am using external libraries like ng2-bootstrap or regular ones like chart.js it was even more difficult to get the prod-built running. A good thing to start is to create the simplest angular-cli project you can imagine and test the prod-built. Then add something you added in your real project and try the prod built again until it breaks. You can also try figuring out the difference between the "simplest angular-cli" project and your project by comparing them in an editor. With this technique I could upgrade my project files pretty easy from v4 to v5 Right now I am looking through my file changes in git, that I did in order to get the prod-built working. I hope you will find the solution for your problem: dist and tmp folder Adminmode tsconfig.json
angular-cli.build.js system-config.ts
** main component ts **
I also added the typings for those Standard/Global libraries, but I guess this is more important for the IDE. |
|
@ghpabs it looks like your project was created with an old version of the CLI. See https://github.com/angular/angular-cli#updating-angular-cli for a way to upgrade your local files. |
@filipesilva you're absolutely right. Updating |
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. |
When i want build my project in production mode (ng build -prod), The Broccoli Plugin can't found a file. However, the command ng build work normaly.
do on your code?
I update my project from angular cli v0.37 to 1.0.0 beta. 1 . My current project work fine.
D:\projects\PocNewBad\src\new-bad\aix\base-project-angular-cli>ng build -prod
(node:8768) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent
version.
| Building(node:8768) DeprecationWarning: 'root' is deprecated, use 'global'
(node:8768) DeprecationWarning: 'GLOBAL' is deprecated, use 'global'
Build failed.
The Broccoli Plugin: [BundlePlugin] failed with:
Error on fetch for app/index.js at file:///D:/base-project-angular-cli/tmp/bundle_plugin-input_base_path-KQb5d
Vmu.tmp/0/app/index.js
Error: ENOENT: no such file or directory, open 'D:\base-project-angular-cli\tmp\bundle_plugin-input_ba
se_path-KQb5dVmu.tmp\0\app\index.js'
at Error (native)
The broccoli plugin was instantiated at:
at BundlePlugin.Plugin (D:\base-project-angular-cli\node_modules\broccoli-plugin\index.js:10:31)
at BundlePlugin.CachingWriter [as constructor](D:\base-project-angular-clinode_modulesbroccoli-caching-
writerindex.js:21:10)
at BundlePlugin (D:\base-project-angular-cli\node_modules\angular-cli\lib\broccoli\angular-broccoli-bundle
.js:11:5)
at Angular2App._getBundleTree (D:\base-project-angular-cli\node_modules\angular-cli\lib\broccoli\angular2-
app.js:375:55)
at Angular2App._buildTree (D:\projects\PocNewBad\src\new-bad\aix\base-project-angular-cli\node_modules\angular-cli\lib\broccoli\angular2-app.
js:137:21)
at new Angular2App (D:\projects\PocNewBad\src\new-bad\aix\base-project-angular-cli\node_modules\angular-cli\lib\broccoli\angular2-app.js:42:2
3)
at module.exports (D:\projects\PocNewBad\src\new-bad\aix\base-project-angular-cli\angular-cli-build.js:6:10)
at Class.module.exports.Task.extend.setupBroccoliBuilder (D:\projects\PocNewBad\src\new-bad\aix\base-project-angular-cli\node_modules\angular
-cli\lib\models\builder.js:55:19)
at Class.module.exports.Task.extend.init (D:\projects\PocNewBad\src\new-bad\aix\base-project-angular-cli\node_modules\angular-cli\lib\models
builder.js:89:10)
at new Class (D:\projects\PocNewBad\src\new-bad\aix\base-project-angular-cli\node_modules\core-object\core-object.js:18:12)
at Class.module.exports.Task.extend.run (D:\projects\PocNewBad\src\new-bad\aix\base-project-angular-cli\node_modules\angular-cli\lib\tasks\bu
ild.js:15:19)
at D:\projects\PocNewBad\src\new-bad\aix\base-project-angular-cli\node_modules\angular-cli\lib\commands\build.js:32:24
at lib$rsvp$$internal$$tryCatch (D:\projects\PocNewBad\src\new-bad\aix\base-project-angular-cli\node_modules\rsvp\dist\rsvp.js:1036:16)
at lib$rsvp$$internal$$invokeCallback (D:\projects\PocNewBad\src\new-bad\aix\base-project-angular-cli\node_modules\rsvp\dist\rsvp.js:1048:17)
I will check if i found something, I post my solve.
Thank a lot :-)
The text was updated successfully, but these errors were encountered: