Hi, Today I'm getting this error, all of a sudden....
# help
s
Hi, Today I'm getting this error, all of a sudden. Tried fixing this with
Copy code
"@serverless-stack/cli": "^1.2.8",
"@serverless-stack/resources": "^1.2.8",
But no change. Still giving the same error.
h
Hey @thdxr , saw you helped with a similar query recently. Could you help us with this?
s
SST is giving this error even if I create a fresh SST project from scratch as per the docs in Windows.
k
@Swapnil Bandiwadekar for now I'd try a non ESM version (1.1.2 was the last). @thdxr I think the
protocol c:
indicates an issue with path interpretation under Windows
s
@Klaus Even if I use the older versions, it is giving me the same error.
k
@Swapnil Bandiwadekar ok, this was more of a guess worth trying😉 I normally develop under either WSL or Linux these days on Stackoverflow some people mentioned using Node16 fixed issues for them. Which node version are you using?
s
@Klaus Node V16.15
k
@thdxr this observation on Stackoverflow perhaps provides an idea for a patch
Copy code
See, they use import() function on a string, that is the result of path.resolve() call. As you have already noticed, the import() function only works with file:// and data:// URLs, but path.resolve() only returns an absolute path (not a URL), which on Windows environment usually starts with the name of the local disk (e.g., C:).
while I haven't tried it, potentially just resolving the url via path.resolve, then checking if it contains "[letter]:" as indication for a windows path + rewriting that on with "file:///[letter;}" might work further discussion here as well
t
Hey this is fixed but not released will do soon