-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Typescript @strapi/typescript-utils
's getConfigPath
return false negative due to incorrect directory checking procedure in Windows
#14306
Comments
FYI, I've updated the return line to this and it's now working properly:
|
@strapi/typescript-utils
's getConfigPath
return false negative due to incorrect directory path in Windows@strapi/typescript-utils
's getConfigPath
return false negative due to incorrect directory checking procedure in Windows
Searching further in |
PS: This issue might duplicate with #14088. But you might consider the solution mentioned above. |
Thanks a lot!! |
This issue has been mentioned on Strapi Community Forum. There might be relevant details there: https://forum.strapi.io/t/strapi-custom-service-types/21977/1 |
Also related to internal TID1832 for an EE customer |
duplicate: #13237 |
it works on local, thanks , but what if i deploy the project on a host machine ? the module folder will removed and new one will be created on the host with the same error ? every time i deploy the code i should edit it manually ? |
Bug report
Required System information
Describe the bug
When starting Strapi with a Typescript-enabled project, in the
getConfigPath
function,dirAbsolutePath = path.resolve(dir)
return backward slash buttypescript
'sts.findConfigFile
return forward slash. So when checking directory usingconfigFilePath.startsWith
, instead oftrue
, it returnfalse
even iftsconfig.json
is exists in both root and admin folder.Steps to reproduce the behavior
tsconfig.json
according to Strapi documentationyarn
yarn start
Expected behavior
getConfigPath
should returntrue
iftsconfig.json
is exists.Screenshots
Code snippets
Modified from get-config-path.js
Potential solution
Instead of
String.startsWith
, usepath.normalize
first.The text was updated successfully, but these errors were encountered: