I tried to deploy my Angular application trough my gitlab pipeline to heroku. But when i check the logs it seems to error on alot of angular components/modules. This is weird because it doesn't show any errors when i try to build the application local.
Here's the link for the console error:
https://pastebin.com/LnncztUu
gitlab logging
I already tried deleting the node_modules folder and reinstalling it but to my suprise it didn't work. And i compiled my angular application in production mode and i found no errors also.
Are you positive the missing components are fully under source control and were added to the repository. Seems like the components in your own project are missing src/app/Shared/Services/Product.service Not found.
Related
I was trying to deploy my MERN based E-commerce website on render.com, after the render terminal shows the build was successful the the webpage shows the error as,
{“message”:“ENOENT: no such file or directory, stat ‘/opt/render/project/src/frontend/build/index.html’”,“stack”:null}
I’m a complete beginner to render and MERN too,
I have no bulid folder in my local
then I tried to create another test app by npx create-react-app test to check if build folder is actually present in there or not, But it is not there, I’m totally in Confused now…
I’m Giving my repo here → stunning spark
I just want to have clear answers for my questions(Please!!!)
Things I want to change in my directory to deploy and host my app Successfully.
Things Need to be configured in the render’s settings
Thanks in Advance!!!
I just want to deploy and host my application on render.com
Just run npm run build into your frontend folder and do check you have removed the "build" keyword from the .gitignore file because it won't let you push the build folder to GitHub and you are good to go.
I'm a newbie to deployment and having lots of issues and could really use some guidance! I have an app with the folder structure shown below.
When I started the deployment, I got the backend part to deploy. Screenshot attached
I did a npm build in my client folder and have the following added to the script in my backend package.json
However, when I try to then deal with including the client side, I have a problem and am getting this error.
I was following a tutorial that had a similar folder structure and deployed via
git subtree push --prefix backend heroku master
I also tried 'main' based on answers on stack overflow but it didn't change the error. I am the only one doing anything with this repository (and it's currently private), have no other branches, and I have nothing that hasn't been pushed to my repository in Github (no changes made recently) so I'm not sure what this is about. Any ideas???
I think your folder structure could be the error.
Try something like that:
projectName:
-client
-package.json
-.env
-index.js
with your project structure, Heroku can't read the index.js and the package.json. Because it is nested in your backend folder.
I think this is why you are getting this error:
Error: Cannot find module '/app/backend/server.js'
So, I have a situation where I needed to edit a node module package I'm using in my node app. Now, on deploying the app to heroku the changes are getting lost because it is getting that package from npm.
Please suggest a way other than publishing my own version of that package to npm.
I don't think you can :/
I have a bot deployed there and every time I wanna deploy some new changes everything gets lost. Probably you should check some external packages installed by Heroku.
I have a nodejs azure app service. It seems like npm isn't installing all the dependencies correctly. The site runs locally fine, when i try in azure, I get 500 responses.
When I check the log, it shows various node dependencies missing. After I install the missing one using the console on the portal, another missing dependency notification pops up.
Using git deploy, I've tried just committing the entire node_modules folder, but for some reason, all the bits don't get uploaded.
Grateful for any ideas about how to sort this out.
We are currently trying to setup an Angular 2 project that also contains a Cloud Service project in its solution. We have set up numerous Angular 1 projects containing Cloud Service projects and have had no errors. When trying to run the MSBuild step for the Angular 2 project, we get the following error on the TeamCity build server:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Windows Azure Tools\2.7\Microsoft.WindowsAzure.targets(2787, 5): error MSB3021: Unable to copy file "C:\TeamCityBuildAgent\temp\buildTmp\.NETFramework,Version=v4.6.1.AssemblyAttributes.cs" to "C:\SourceControlFolder\Apps\MyApp\MyApp.CloudDeployment\obj\Debug\Website\C:\TeamCityBuildAgent\temp\buildTmp\.NETFramework,Version=v4.6.1.AssemblyAttributes.cs". The given path's format is not supported.
The main problem seems to be the build attempting to throw the full C:\TeamCityBuildAgent.. path into the obj\Debug\Website folder.
My current MSBuild parameters are:
/p:Configuration="Dev"
/p:platform="Any CPU"
/p:OctoPackEnforceAddingFiles=true
/p:OctoPackProjectName=MyApp_Dev
I've tried the following solutions:
Making sure the latest Visual Studio Update is installed (for MSBuild)
Running the install tool to repair Azure Tools 2.7 on the build server.
Changing the debug configuration in the build.
Ensuring TypeScript 1.7.6 is installed on the build server (even though it's an Azure.targets issue) [https://github.com/Microsoft/TypeScript/issues/6215]
Updated the project to Azure Tools 2.9. The same error remains except it's failing on the 2.9 folder instead now.
Curious if anyone else has experienced this error and knows a fix. I'll keep this post updated as I try other solutions.
Update
It appears that what is causing this issue is this line within the .csproj file:
<FilesToIncludeForPublish>AllFilesInProjectFolder</FilesToIncludeForPublish>
This is specified for our build configurations to copy all files generated by the ng build to the output directory of the publish. What I don't understand at the moment is how this works on all of the devs' local machines but does not work on our build server. Will keep this posted as I find more info or any kind of workaround.
This ended up being the fix:
Instead of targeting the .sln in MSBuild, we specifically targeted the .csproj file. This fixed the build errors and allowed us to keep the FilesToIncludeForPublish tag inside.