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
I am trying to bundle my TypeScript files, specifically local sandbox files for trying out my package before publishing it, and I am trying to transpile and bundle my TypeScript files with the following command:
The expected output would be to find my bundled index.js file in sandbox/dist, but instead of that, I get an error:
error: Cannot read directory "dist/esm": The system cannot find the path specified.
package.json:9:14: error: Cannot read directory "dist/esm/index.js": The system cannot find the path specified.
"module": "dist/esm/index.js",
~~~~~~~~~~~~~~~~~~~
2 errors
Done in 0.26s.
Removing both the main and the module entrypoints(removing just module will lead to esbuild erroring out as it cannot find "dist/cjs/index.js")
Is there any way to solve this without having an otherwise useless directory(I'm not outputting anything there) or without having to develop with my entrypoints missing, adding them back before comitting every time?
I am using esbuild 0.6.28, running on a Windows 10 machine with Node v14.8.0.
The text was updated successfully, but these errors were encountered:
BlueGhostAlt
changed the title
Presence of module and main field in package.json
Presence of module and main fields in package.json
Sep 1, 2020
Thanks for reporting this. It looks like this is a Windows-only issue, and is a regression from the previous release. I’ll fix this in the next release.
I am trying to bundle my TypeScript files, specifically local sandbox files for trying out my package before publishing it, and I am trying to transpile and bundle my TypeScript files with the following command:
The expected output would be to find my bundled
index.js
file insandbox/dist
, but instead of that, I get an error:My package.json entrypoints are as follows:
Things that solve the issue:
dist/esm
directoryIs there any way to solve this without having an otherwise useless directory(I'm not outputting anything there) or without having to develop with my entrypoints missing, adding them back before comitting every time?
I am using esbuild 0.6.28, running on a Windows 10 machine with Node v14.8.0.
The text was updated successfully, but these errors were encountered: