Comments (8)
@chihab I tested the command provided npx ng add @ngx-env/[email protected]
and no manual configuration nor further actions were required. I was able to use the environment variables 👍🏼
The build architect target property in the angular.json
file was automatically updated to @ngx-env/builder:application
from ngx-env.
In angular.json
build target
-"browser": "src/main.ts",
+"main": "src/main.ts",
serve target
-"buildTarget": "ng-app17:build:production"
+"browserTarget": "ng-app17:build:production"
-"buildTarget": "ng-app17:build:development"
+"browserTarget": "ng-app17:build:development"
Let me know if that works for you please.
Note that it will use the webpack builder which @ngx-env/builder is built on top of.
There are still issues with using the esbuild plugins, once stable and enough documented, I'll release a new v17 compatible with vite and esbuild.
from ngx-env.
Thank you @chihab . I was using the env pipe and migrated everything as you said and removed the dependency. Everything works.
from ngx-env.
Yeah, got same error
from ngx-env.
@chihab the workaround provided did the trick 😄
Thanks for your time and assistance. Look forward to the new version 🥇 👍🏼
from ngx-env.
Could you give npx ng add @ngx-env/[email protected]
a try?
Make sure your build architect target has "builder": "@ngx-env/builder:application"
.
from ngx-env.
The latest available version of @ngx-env/core is 16.1.3 depending on Angular 16. I also cannot see updated code in the repository so for the moment I cannot update to angular version 17 until this package is updated. Does this code need more work for Angular 17 support or is simply a dependency update?
from ngx-env.
@ngx-env/core@16 should work with Angular 17 but its peer dep indicates ^16 so you should have a peer dep missing issue but if you force, it should work, in theory.
Now, I would suggest not to use @ngx-env/core mainly because the good practice is not put the process.env in the template nor in the component code but rather reference it in your angular environment files (or any configuration file).
from ngx-env.
Related Issues (20)
- Problem with module federation HOT 2
- I cannot access my environment variables in my environment.ts HOT 2
- version info for import.meta.env HOT 1
- Thank you for making this HOT 1
- environment variables not being set HOT 2
- ng build throws rxjs switchmap error HOT 5
- Do the `secret` keys get included in the final build? HOT 2
- Document usage with custom builder and @dotenv-run/webpack
- Prepare stackblitz playground
- Support angular workspace for ng-add
- Issue while building with v17 when SSR is disabled HOT 10
- Replace variables on pre-rendered pages HOT 4
- Design a logo
- @ngx-env not loading variables HOT 6
- Schema validation failed on `ng serve` HOT 7
- @ngx-env/builder Mistargets File Path for index.server.html. ( Nx + Angular ) monorepo HOT 4
- Add browser-esbuild builder HOT 2
- how to apply Env Vars to multiple npm scripts HOT 3
- @ngx-env not working with `localize` option in SSR HOT 1
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 ngx-env.