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

Exception gets hidden when '--output-path' is used in production build #7203

Closed
rahul-winner opened this issue Jul 30, 2017 · 4 comments · Fixed by #7313
Closed

Exception gets hidden when '--output-path' is used in production build #7203

rahul-winner opened this issue Jul 30, 2017 · 4 comments · Fixed by #7313
Labels
help wanted P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent type: bug/fix

Comments

@rahul-winner
Copy link

rahul-winner commented Jul 30, 2017

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

1.2.3

Repro steps.

if a component template using a property like below which is not present on component class, then run production build with

ng build --prod --output-path target/mydist

The log given by the failure.

fs.js:923
[echo] return binding.mkdir(pathModule._makeLong(path),
[echo] ^
[echo]
[echo] Error: ENOENT: no such file or directory, mkdir 'C:\git-ws\myapp\ds\myapp-ng\myapp-portal\target\web-build\webapp'
[echo] at Error (native)
[echo] at Object.fs.mkdirSync (fs.js:923:18)
[echo] at licensePlugin.write (C:\git-ws\myapp\ds\myapp-ng\myapp-portal\node_modules\license-webpack-plugin\index.js:176:10)
[echo] at licensePlugin. (C:\git-ws\myapp\ds\myapp-ng\myapp-portal\node_modules\license-webpack-plugin\index.js:199:12)
[echo] at Compiler.applyPlugins (C:\git-ws\myapp\ds\myapp-ng\myapp-portal\node_modules\tapable\lib\Tapable.js:61:14)
[echo] at onCompiled (C:\git-ws\myapp\ds\myapp-ng\myapp-portal\node_modules\webpack\lib\Compiler.js:238:12)
[echo] at C:\git-ws\myapp\ds\myapp-ng\myapp-portal\node_modules\webpack\lib\Compiler.js:494:13
[echo] at next (C:\git-ws\myapp\ds\myapp-ng\myapp-portal\node_modules\tapable\lib\Tapable.js:184:11)
[echo] at Compiler. (C:\git-ws\myapp\ds\myapp-ng\myapp-portal\node_modules\webpack\lib\CachePlugin.js:62:5)
[echo] at Compiler.applyPluginsAsyncSeries (C:\git-ws\myapp\ds\myapp-ng\myapp-portal\node_modules\tapable\lib\Tapable.js:188:13)
[echo] at C:\git-ws\myapp\ds\myapp-ng\myapp-portal\node_modules\webpack\lib\Compiler.js:491:10
[echo] at next (C:\git-ws\myapp\ds\myapp-ng\myapp-portal\node_modules\tapable\lib\Tapable.js:184:11)
[echo] at Compilation.compilation.plugin (C:\git-ws\myapp\ds\myapp-ng\myapp-portal\node_modules@angular\cli\plugins\suppress-entry-chunks-webpack-plugin.js:35:17)
[echo] at Compilation.applyPluginsAsyncSeries (C:\git-ws\myapp\ds\myapp-ng\myapp-portal\node_modules\tapable\lib\Tapable.js:188:13)
[echo] at self.applyPluginsAsync.err (C:\git-ws\myapp\ds\myapp-ng\myapp-portal\node_modules\webpack\lib\Compilation.js:645:19)
[echo] at next (C:\git-ws\myapp\ds\myapp-ng\myapp-portal\node_modules\tapable\lib\Tapable.js:184:11)

Desired functionality.

ERROR in C:/git-ws/myapp/ds/myapp-ng/myapp-portal/src/main/webapp/$$_gendir/app/ds/ds-grid/ds-grid.component.ngfactory.ts (242,31): Property 'datasourceName' does not exist on type 'dsGridComponent'.

ERROR in C:/git-ws/myapp/ds/myapp-ng/myapp-portal/src/main/webapp/$$_gendir/app/ds/ds-grid/ds-grid.component.ngfactory.ts (242,31): Property 'datasourceName' does not exist on type 'dsGridComponent'.

We should be able to identify the erroneous component or its template when using --output-path or outDir.

Please let me know if you need more information.

Mention any other details that might be useful.

I also tried using outDir in .angular-cli.json however, got the same results.

@clydin
Copy link
Member

clydin commented Jul 31, 2017

As a temporary workaround, the --no-extract-licenses option can be used.

@filipesilva
Copy link
Contributor

This seems to be a problem with license-webpack-plugin that we use, where it tries to create the file directly and files. It probably should be added to the webpack assets instead.

@filipesilva filipesilva added blocked help wanted P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent type: bug/fix labels Jul 31, 2017
@rahul-winner
Copy link
Author

thanks @filipesilva

by the way, I tried with workaround '--no-extract-licenses' and it worked. I'll be glad if someone could provide some solution.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants