You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to build the appworker thread using the build script (build-all or build-threads), I get either:
EINVAL: invalid argument, stat 'D:\System Volume Information', or
EPERM: operation not permitted, stat 'D:\System Volume Information' (when not running as administrator)
This occurs on Windows when building the Neo.mjs project.
Steps to Reproduce
Run npx neo-app@latest or initiate a build using the generated script (npm run build-all or npm run build-threads).
Cause
The script (likely through ContextModule.resolveDependencies) tries to access restricted system folders like D:\System Volume Information, which is not permitted.
Environment
OS: Windows 11
Node.js: v23.10
Neo.mjs: latest
Terminal: PowerShell
Additional Info
It appears that Webpack is attempting to resolve .mjs files across the entire project directory, including protected system folders. This causes permission errors on Windows.
@ahmad-su Without having Windows installed, I can sadly not help too much on this one (flying blind).
I am sure though, that the problem is the following regex comment: /* webpackInclude: /(?:\/|\\)app.mjs$/ */.
For / based file systems it does work fine, for \ it looks like it does not.
Let me explain what it is supposed to do:
For a webpack based build, the app worker => worker/App.mjs file is supposed to find all app.mjs files.
Inside the framework repo, it needs to go 2 folder levels up (repo root), and it can then find the target files inside the apps, examples & docs folder.
Inside a workspace, it needs to go 4 folder levels up, since neo is inside node_modules/neo.mjs/.
If it would try to go further up, there might be security related restrictions (permission denied).
The main idea is, that by fetching all app.mjs files, we do get split chunks & tree-shaking across multiple apps out of the box. E.g. if you would lazy-load a 2nd neo app into your website, there should be little overhead.
Thanks for the insight @tobiu , the solution is just by nesting the project folder 1 level deeper. so ../.. will not accidentally go to D:
But I'm still curious to modify the App.mjs to make it work wherever I place the project.
Description
When trying to build the
appworker
thread using the build script (build-all
orbuild-threads
), I get either:EINVAL: invalid argument, stat 'D:\System Volume Information'
, orEPERM: operation not permitted, stat 'D:\System Volume Information'
(when not running as administrator)This occurs on Windows when building the Neo.mjs project.
Steps to Reproduce
npx neo-app@latest
or initiate a build using the generated script (npm run build-all
ornpm run build-threads
).Cause
The script (likely through
ContextModule.resolveDependencies
) tries to access restricted system folders likeD:\System Volume Information
, which is not permitted.Environment
Additional Info
It appears that Webpack is attempting to resolve
.mjs
files across the entire project directory, including protected system folders. This causes permission errors on Windows.Log
What I’ve Tried
npm i && npm run build-threads
: leads to EINVAL errneo.mjs/src/worker/App.mjs
, but looks like it's not the case:Let me know if you need help reproducing it. Thanks
The text was updated successfully, but these errors were encountered: