Rush/link-module-alias

Catch promise when directory missing?

Closed this issue · 1 comments

$ command -v link-module-alias && link-module-alias clean || true
/Volumes/code/api/node_modules/.bin/link-module-alias
(node:83627) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, unlink 'node_modules/@operations/package.json'
(node:83627) 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:83627) [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.

I believe this is the line that's causing this.

link-module-alias/index.js

Lines 159 to 161 in de9e75a

const unlinkedModules = await Promise.all(modules.map(mod => {
return unlinkModule(mod);
}));

Rush commented

Published a fix in 1.1.6