'NX - VScode Moving or Renaming files that are resolved with tsconfig.json paths do not update automatically
I'm trying to connect an NX project that uses paths to resolve library folders.
"paths": {
"@nxlib/mylib/*": ["libs/mylib/src/lib/*"],
}
Currently I'm able to get VsCode on a fresh NX project to automatically update the import paths of relative files when I remove the "include":[] in each project/lib's tsconfig.json (as stated here: Can VS Code automatically update JavaScript and TypeScript import paths on file rename/move?)
Althouth if I start to use the alias path @nxlib/mylib/my-file renaming or moving my-file.ts does not automatically update the import paths.
Does anyone know how I can get renaming to work with paths aliases?
Solution 1:[1]
When you want to move or rename a package the best way is using the plugin workspace, because it'll change automatically the name of /tools/..., package.json, tsconfig.base.json...
Example
You want to rename the package
apptoapp-v2.
To rename/move the library/app, you need to run this command:
nx g @nrwl/workspace:move --projectName=app --destination=app-v2
Or if you don't have Nx installed globally on your computer, then:
npx ng g @nrwl/workspace:move ...
You can find other commands (e.g. remove) at the bottom of the main menu

Solution 2:[2]
As per your information there is something which is missing during the deployment from local. Because it is working from local and also working when it is created from portal.
Follow the below steps to check the issue.
- Check how the function is getting triggered.
- Enable Application Insights for function.
- Check for the logs in Application Insights when the function gets triggered.
With this we can find the root cause.
Also along with this, there are two reason for the function app not triggering after deployment.
- Add the application settings under configuration in function app.
- If there are any connections made to storage, you need to add CORS. Try these steps and check if it is working or not. Also do share the error message if it is not resolved by you.
Apart from all these troubleshooting steps you share the information to Azure community. Check this GIT Azure function QnA
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Guillem Puche |
| Solution 2 | SaiKarri-MT |
