Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

computeCommonSourceDirectory doesn't work with subst on windows #58602

Closed
irbian opened this issue May 21, 2024 · 2 comments
Closed

computeCommonSourceDirectory doesn't work with subst on windows #58602

irbian opened this issue May 21, 2024 · 2 comments
Assignees
Labels
Working as Intended The behavior described is the intended behavior; this is not a bug

Comments

@irbian
Copy link

irbian commented May 21, 2024

🔎 Search Terms

"Cannot find the common subdirectory path for the input file"

💻 Code

git clone https://github.com/TerriaJS/terriajs.git
git checkout 8.7.2

subst X: \terriajs
X:
corepack enable
yarn install

PS X:\> yarn install
yarn install v1.22.22
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
$ gulp post-npm-install
[11:17:56] Using gulpfile X:\gulpfile.js
[11:17:56] Starting 'post-npm-install'...
[11:17:56] Starting 'copy-cesium-assets'...
[11:17:56] Starting 'copy-cesium-source-assets'...
[11:17:56] Finished 'copy-cesium-source-assets' after 362 ms
[11:17:56] Starting 'copy-cesium-workers'...
[11:17:57] Finished 'copy-cesium-workers' after 213 ms
[11:17:57] Starting 'copy-cesium-thirdparty'...
[11:17:57] Finished 'copy-cesium-thirdparty' after 19 ms
[11:17:57] Finished 'copy-cesium-assets' after 599 ms
[11:17:57] Finished 'post-npm-install' after 603 ms
$ gulp post-npm-install
[11:17:57] Using gulpfile X:\gulpfile.js
[11:17:57] Starting 'post-npm-install'...
[11:17:57] Starting 'copy-cesium-assets'...
[11:17:57] Starting 'copy-cesium-source-assets'...
[11:17:58] Finished 'copy-cesium-source-assets' after 366 ms
[11:17:58] Starting 'copy-cesium-workers'...
[11:17:58] Finished 'copy-cesium-workers' after 177 ms
[11:17:58] Starting 'copy-cesium-thirdparty'...
[11:17:58] Finished 'copy-cesium-thirdparty' after 16 ms
[11:17:58] Finished 'copy-cesium-assets' after 564 ms
[11:17:58] Finished 'post-npm-install' after 589 ms
$ yarn build-for-node && husky install
yarn run v1.22.22
$ tsc -b tsconfig-node.json
error TS5055: Cannot write file 'D:/Proyectos/ISTAC/2010-metamac/04-git/terriajs/lib/Styled/mixins.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/ConsoleAnalytics.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/DataUri.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/ServerConfig.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/addedForCharts.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/arrayContains.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/arrayProduct.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/closeWhenEscapeIsPressed.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/combineData.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/combineFilters.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/containsAny.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/createFragmentFromTemplate.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/formatPropertyValue.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/inherit.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/isBrowserCompatible.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/isCommonMobilePlatform.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/linkifyContent.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/loadText.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/loadWithXhr.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/loadXML.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/pollToPromise.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/polyfill.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/prerequisites.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/promiseFunctionToExplicitDeferred.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/readJson.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/readText.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/readXml.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/rectangleToPolygonArray.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/removeView.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/replaceUnderscores.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/serializeToJson.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/sortedIndices.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/supportsWebGL.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/triggerResize.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Core/updateFromJson.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Map/Cesium/createCredit.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Map/DragPoints/CesiumDragPoints.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Map/DragPoints/DragPoints.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Map/DragPoints/LeafletDragPoints.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Map/Geocoder/AddressGeocoder.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Map/Geocoder/BulkAddressGeocoderResult.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Map/LeafletPatched.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Map/VarType.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Map/Vector/EarthGravityModel1996.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Map/Vector/geoJsonGeometryFromGeoRssSimpleGeometry.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Map/Vector/geoJsonGeometryFromGmlGeometry.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Map/Vector/geoJsonGeometryFromW3cGeometry.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Map/Vector/geoRssConvertor.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Map/Vector/gmlToGeoJson.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Map/Vector/unionRectangleArray.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Map/Vector/unionRectangles.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Map/Vector/zoomRectangleFromPoint.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Models/Catalog/createCatalogMemberFromType.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Models/Feature/ImageryLayerFeatureInfo.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Models/FunctionParameters/BooleanParameterGroup.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Models/FunctionParameters/RegionDataValue.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Models/FunctionParameters/createParameterFromType.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Models/getToken.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Models/markerIcon.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/ReactViewModels/DisclaimerHandler.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/ReactViews/BottomDock/Timeline/DateFormats.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/ReactViews/Custom/Chart/downloadHrefWorker.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/ReactViews/Generic/Timer/drawTimer.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/ReactViews/Guide/satelliteGuideData.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/ReactViews/Hooks/useKeyPress.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/ReactViews/Map/Panels/BaseOuterPanel.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/Styled/mixins.js' because it would overwrite input file.

error TS5055: Cannot write file 'X:/lib/ThirdParty/xml2json.js' because it would overwrite input file.

tsconfig-node.json:6:5 - error TS5009: Cannot find the common subdirectory path for the input files.

6     "outDir": "dist",
      ~~~~~~~~


Found 69 errors.

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

🙁 Actual behavior

The main problem:

tsconfig-node.json:6:5 - error TS5009: Cannot find the common subdirectory path for the input files.

6     "outDir": "dist",
      ~~~~~~~~

I guess that subst interacts with that, because it doesn't work properly, it tries to overwrite onto lib

🙂 Expected behavior

That it would work with subst

Additional information about the issue

No response

@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label Jun 7, 2024
@sheetalkamat
Copy link
Member

I dont think we can do anything here.
The list of files include original location of the files that come from resolving modules as preserveSymlinks is off:
But if i build the project with that option on - which is what you probably want to not evaluate "real file path" for the files there are no errors:

Attaching the resolution log:
resolutions.txt

@sheetalkamat sheetalkamat added Working as Intended The behavior described is the intended behavior; this is not a bug and removed Needs Investigation This issue needs a team member to investigate its status. labels Jun 25, 2024
@typescript-bot
Copy link
Collaborator

This issue has been marked as "Working as Intended" and has seen no recent activity. It has been automatically closed for house-keeping purposes.

@typescript-bot typescript-bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Working as Intended The behavior described is the intended behavior; this is not a bug
Projects
None yet
Development

No branches or pull requests

4 participants