Comments (2)
I'm also running into this issue. Anyone have any suggestions?
from anvel.
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)
- JWT Token not beeing stored HOT 4
- PHP Parse error HOT 1
- Edited text doesn't change after refresh HOT 2
- some error while run webpack HOT 22
- installing issue HOT 5
- How to final publish on public shared hosying? HOT 5
- More details about login component
- How to close error alert? HOT 1
- How to submit get params to api? HOT 1
- Running anvel on wamp (Windows 8.1) HOT 2
- Error 404, when I try to logout/delete token HOT 1
- Errors on installing HOT 5
- Issue with Install HOT 1
- How to test API alone HOT 8
- When I install , running npm install in my project folder , it shows following message HOT 2
- Angular with Laravel tutorial HOT 3
- You have to be inside an angular-cli project in order to use the build command. HOT 4
- browsersync for automatic build system HOT 2
- missing @angular/cdk
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anvel.