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
Error: Build failed with 1 error:
../../../AppData/Local/Temp/tmp-5848-66jQXSM4BQce/nuts/src/index.module.css:2:15: error: Could not resolve "C:Users\rmancAppDataAppDataLocalTemp\tmp-5848-66jQXSM4BQce\nutssrcindex.css" (mark it as external to exclude it from the bundle)
at failureErrorWithLog (C:\Users\rmanc\Documents\projs\nuts\node_modules\esbuild\lib\main.js:1449:15)
at C:\Users\rmanc\Documents\projs\nuts\node_modules\esbuild\lib\main.js:1131:28
at runOnEndCallbacks (C:\Users\rmanc\Documents\projs\nuts\node_modules\esbuild\lib\main.js:921:63)
at buildResponseToResult (C:\Users\rmanc\Documents\projs\nuts\node_modules\esbuild\lib\main.js:1129:7)
at C:\Users\rmanc\Documents\projs\nuts\node_modules\esbuild\lib\main.js:1236:14
at handleIncomingPacket (C:\Users\rmanc\Documents\projs\nuts\node_modules\esbuild\lib\main.js:706:9)
at Socket.readFromStdout (C:\Users\rmanc\Documents\projs\nuts\node_modules\esbuild\lib\main.js:576:7)
at Socket.emit (events.js:376:20)
at addChunk (internal/streams/readable.js:309:12)
error Command failed with exit code 1.
I noticed the path C:Users\rmancAppDataAppDataLocalTemp\tmp-5848-66jQXSM4BQce\nutssrcindex.css and looked at the source:
This plugin fails on Windows because of backslashes in paths.
This is my case:
Which currently produces this result:
I noticed the path
C:Users\rmancAppDataAppDataLocalTemp\tmp-5848-66jQXSM4BQce\nutssrcindex.css
and looked at the source:esbuild-plugin-css-modules/index.ts
Lines 128 to 132 in 1f97e22
The generated code looks like this:
which obviously doesn't work.
--
I've managed to make it work by wrapping
tmpFilePath
with https://github.com/sindresorhus/slash.I'm writing a PR addressing this issue.
The text was updated successfully, but these errors were encountered: