Question
App Platform keeps using cached node_modules despite changes
I have been deploying a node.js server application via app platform without issue. In the last push to github, I have introduced typescript which has made significant changes to my package.json and package-lock.json including adding typescript 4.1.3.
my build command is now
"build": "tsc",
But my build is failing because with the following because it can’t find the tsc command. relevant bit of the deployment logs below..
tsystems-server | 16:28:37 Installing node_modules using npm
tsystems-server | 16:28:44 added 119 packages in 5.537s
tsystems-server | 16:28:45 Running custom build command: npm run build
tsystems-server | 16:28:45
tsystems-server | 16:28:45 > tsystems-server@1.0.0 build /workspace
tsystems-server | 16:28:45 > tsc
tsystems-server | 16:28:45
tsystems-server | 16:28:45 sh: 1: tsc: not found
Not sure what is going wrong, the npm run build command works locally. I have tried manually referencing “./node_modules/....etc../tsc” in the build command but that didn’t work. Also tried npx tsc but that just got really wierd.
Any clues?
Michael
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
Ok this is getting ridiculous now, this is now my build command in package.json…
but the build process still won’t make the new packages (including typescript) available in the npm environment when the tsc command is run.
Am I missing something? Seems to be broken to me.
This is the relevant bit of the build logs…