'static' in sandbox complains node_modules\@architect\shared\.arc is missing
mikemaccana opened this issue · 0 comments
mikemaccana commented
Describe the issue
Using static
in Arc 6.0.0 sandbox fails on one of my machines:
Error
ENOENT: no such file or directory, open 'C:\Users\mikem\Code\temp\appless\src\http\get-index\node_modules\@architect\shared\.arc'0.
Error: ENOENT: no such file or directory, open 'C:\Users\mikem\Code\temp\appless\src\http\get-index\node_modules\@architect\shared\.arc'
at Object.openSync (fs.js:443:3)
at Object.readFileSync (fs.js:343:35)
at _static (C:\Users\mikem\Code\temp\appless\node_modules\@architect\functions\src\static\index.js:31:20)
at C:\Users\mikem\Code\temp\appless\src\http\get-index\node_modules\@architect\shared\layout.js:34:25
at Array.forEach ()
at layout (C:\Users\mikem\Code\temp\appless\src\http\get-index\node_modules\@architect\shared\layout.js:33:17)
at http (C:\Users\mikem\Code\temp\appless\src\http\get-index\index.js:23:11)
at process._tickCallback (internal/process/next_tick.js:68:7)
at evalScript (internal/bootstrap/node.js:592:13)
at startup (internal/bootstrap/node.js:265:9)
Versions:
"@architect/architect": "^6.0.0",
"@architect/functions": "^3.3.2",
"@architect/sandbox": "^1.3.6",
Also Windows 10, using arc.json
.
The error occurs in:
https://github.com/architect/functions/blob/master/src/static/index.js#L25
From Slack discussion, arc should no longer expect:
some-lambda/node_modules/@architect/shared/.arc
to exist, but this isn't true according to
https://github.com/architect/functions/blob/master/src/static/index.js#L12
Workarounds
- If I do not use
static
, the issue goes away. - If I add the file to
some-lambda/node_modules/@architect/shared/.arc
, the issue goes away.