Subdirectories leading to an exception
Closed this issue · 2 comments
If either the assets folder or the output option contains subdirctories, the builder crashes with:
(node:16280) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, mkdir '\a\b/'
at Object.mkdirSync (fs.js:768:3)
at pathToFolder.split.reduce ('\node_modules@linnenschmidt\build-ng-packagr\src\build\assets.js:64:32)
at Array.reduce ()
at entries.forEach.entry ('\node_modules@linnenschmidt\build-ng-packagr\src\build\assets.js:61:45)
at Array.forEach ()
at globby.then.entries ('\node_modules@linnenschmidt\build-ng-packagr\src\build\assets.js:57:25)
at process.internalTickCallback (internal/process/next_tick.js:77:7)
(node:16280) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a
promise which was not handled with .catch(). (rejection id: 1)
(node:16280) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
But anyway, thank you for writing this little helper.
Hi,
thanks for pointing that out.
I just tested the behavior and added some test cases for deep asset handling. I think it's working as expected.
Here you can see the asset configuration of the test environment. It also includes deep assets.
tests/build_ng_packagr/ng-packaged/angular.json#L14-L27
If it still doesn't work, I need more information about the configuration.
I close this.
If it still doesn't work, provide more information about the configuration please.