Giter Club home page Giter Club logo

Comments (2)

HexagonStorms avatar HexagonStorms commented on September 17, 2024

I'm also running into this issue. Anyone have any suggestions?

from anvel.

HexagonStorms avatar HexagonStorms commented on September 17, 2024

I figured it out:
When deploying to a live server, you need to do either 2 things:

Option 1: Running ng build in the deploy script
Depending on what live server you use, if you run into a 'FileNotFound' laravel error, that means that ng build did not run on the live server. And the default .gitignore hides the /dist/index compiled angular files (those are the files created when running ng build). So just make sure your live server is running ng build, and it'll create the necessary dist folder.

Option 2: Removing public/dist from the gitignore file.
If you are like me and deployed to Heroku, it will detect the codebase as a PHP laravel app and correctly run composer install, but it will not run ng build. If you just remove public/dist from the gitignore file, then commit that, then run your git deploy script (in my case, git push heroku master), then those files will be on the live server and you'll be good to go.

The downside of Option 2 is that your compiled file might contain sensitive information. Important API keys, etc may be inside of this file, I believe. Be cautious of what's available publicly should someone unauthorized gain access to your server.

from anvel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.