FlowFuse / FlowFuse/flowfuse

Investigate why the clean webpack plugin is failing

Open
#4,931 0 comments 0 reactions 1 assignee Claimed by @cstns View on GitHub
area:frontend needs-triage type:bug
Dominant language
JavaScript
Stars
400
Forks
89
Avg merge
1d 21h
Merged PRs (30d)
146

Description

### Current Behavior

Changing the login layout surfaced a webpack but which would need more investigation.

The initial logo wass replaced with a new one but I did not catch it locally because webpack crashed.
```
[webpack-cli] Error: clean-webpack-plugin: Cannot delete files/folders outside the current working directory. Can be overridden with the `dangerouslyAllowCleanPatternsOutsideProject` option.
at CleanWebpackPlugin.removeFiles (/home/cstns/Workspace/FlowFuse/dev-env/packages/flowfuse/node_modules/clean-webpack-plugin/dist/clean-webpack-plugin.js:211:15)
at CleanWebpackPlugin.handleDone (/home/cstns/Workspace/FlowFuse/dev-env/packages/flowfuse/node_modules/clean-webpack-plugin/dist/clean-webpack-plugin.js:173:12)
at /home/cstns/Workspace/FlowFuse/dev-env/packages/flowfuse/node_modules/clean-webpack-plugin/dist/clean-webpack-plugin.js:89:12
at Hook.eval [as callAsync] (eval at create (/home/cstns/Workspace/FlowFuse/dev-env/packages/flowfuse/node_modules/tapable/lib/HookCodeFactory.js:33:10), :9:1)
at Watching._done (/home/cstns/Workspace/FlowFuse/dev-env/packages/flowfuse/node_modules/webpack/lib/Watching.js:314:28)
at /home/cstns/Workspace/FlowFuse/dev-env/packages/flowfuse/node_modules/webpack/lib/Watching.js:229:21
at Compiler.emitRecords (/home/cstns/Workspace/FlowFuse/dev-env/packages/flowfuse/node_modules/webpack/lib/Compiler.js:1044:4)
at /home/cstns/Workspace/FlowFuse/dev-env/packages/flowfuse/node_modules/webpack/lib/Watching.js:205:22
at /home/cstns/Workspace/FlowFuse/dev-env/packages/flowfuse/node_modules/webpack/lib/Compiler.js:1007:14
at Hook.eval [as callAsync] (eval at create (/home/cstns/Workspace/FlowFuse/dev-env/packages/flowfuse/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)
at /home/cstns/Workspace/FlowFuse/dev-env/packages/flowfuse/node_modules/webpack/lib/Compiler.js:1004:27
at /home/cstns/Workspace/FlowFuse/dev-env/packages/flowfuse/node_modules/neo-async/async.js:2818:7
at done (/home/cstns/Workspace/FlowFuse/dev-env/packages/flowfuse/node_modules/neo-async/async.js:3522:9)
at Hook.eval [as callAsync] (eval at create (/home/cstns/Workspace/FlowFuse/dev-env/packages/flowfuse/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)
at /home/cstns/Workspace/FlowFuse/dev-env/packages/flowfuse/node_modules/webpack/lib/Compiler.js:833:33
at /home/cstns/Workspace/FlowFuse/dev-env/packages/flowfuse/node_modules/graceful-fs/graceful-fs.js:143:16
at /home/cstns/Workspace/FlowFuse/dev-env/packages/flowfuse/node_modules/graceful-fs/graceful-fs.js:61:14
at FSReqCallback.oncomplete (node:fs:187:23)

```

Upon restart it did not clear it's former built assets (including the deleted logo) and continued to serve stale images

### Expected Behavior

weback should clean up after itself, not sure why it's considering the dist directory outside of the 'current working directory'

### Steps To Reproduce

delete an image/asset, check if the application picks up on it

### Environment

- FlowFuse version: 2.11
- Node.js version: n/a
- npm version: n/a
- Platform/OS: n/a
- Browser: n/a

### Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.