Comments (2)
It would help if you can reproduce the issue in a newly created nx project
EDIT: I was able to reproduce it, I am looking into it. It only happens on v15
from dotenv-run.
hello chihab.
I have been stuck with this error for a long time. After a lot of research, I came up with a clue. According to this link. This error occurs when using customized configuration, and if the webpack version does not match in bundlers.
i used from follow commands to check webpack versions:
npm ls webpack
and result:
├─┬ @angular-devkit/build-angular@15.2.10
│ ├─┬ @angular-devkit/build-webpack@0.1502.10
│ │ └── webpack@5.76.1 deduped <======================================
│ ├─┬ @ngtools/[email protected]
│ │ └── webpack@5.76.1 deduped
│ ├─┬ babel-loader@9.1.2
│ │ └── webpack@5.76.1 deduped
│ ├─┬ copy-webpack-plugin@11.0.0
│ │ └── webpack@5.76.1 deduped
│ ├─┬ css-loader@6.7.3
│ │ └── webpack@5.76.1 deduped
│ ├─┬ less-loader@11.1.0
│ │ └── webpack@5.76.1 deduped
│ ├─┬ mini-css-extract-plugin@2.7.2
│ │ └── webpack@5.76.1 deduped
│ ├─┬ postcss-loader@7.0.2
│ │ └── webpack@5.76.1 deduped
│ ├─┬ sass-loader@13.2.0
│ │ └── webpack@5.76.1 deduped
│ ├─┬ source-map-loader@4.0.1
│ │ └── webpack@5.76.1 deduped
│ ├─┬ webpack-dev-middleware@6.0.1
│ │ └── webpack@5.76.1 deduped
│ ├─┬ webpack-dev-server@4.11.1
│ │ ├─┬ webpack-dev-middleware@5.3.3
│ │ │ └── webpack@5.76.1 deduped
│ │ └── webpack@5.76.1 deduped
│ ├─┬ webpack-subresource-integrity@5.1.0
│ │ └── webpack@5.76.1 deduped
│ └─┬ webpack@5.76.1
│ └─┬ terser-webpack-plugin@5.3.9
│ └── webpack@5.76.1 deduped
├─┬ @ngx-env/builder@17.2.3
│ └─┬ @dotenv-run/webpack@1.3.4
│ └── webpack@5.89.0 deduped <=======================================
├─┬ @nrwl/angular@15.9.2
│ ├─┬ @nrwl/webpack@15.9.2
│ │ └── webpack@5.89.0 deduped
│ └── webpack@5.89.0
└─┬ @nrwl/webpack@15.9.4
├─┬ babel-loader@9.1.3
│ └── webpack@5.89.0 deduped
├─┬ copy-webpack-plugin@10.2.4
│ └── webpack@5.89.0 deduped
├─┬ css-loader@6.8.1
│ └── webpack@5.89.0 deduped
├─┬ css-minimizer-webpack-plugin@3.4.1
│ └── webpack@5.89.0 deduped
├─┬ file-loader@6.2.0
│ └── webpack@5.89.0 deduped
├─┬ fork-ts-checker-webpack-plugin@7.2.13
│ └── webpack@5.89.0 deduped
├─┬ less-loader@11.1.0
│ └── webpack@5.89.0 deduped
├─┬ mini-css-extract-plugin@2.4.7
│ └── webpack@5.89.0 deduped
├─┬ postcss-loader@6.2.1
│ └── webpack@5.89.0 deduped
├─┬ sass-loader@12.6.0
│ └── webpack@5.89.0 deduped
├─┬ source-map-loader@3.0.2
│ └── webpack@5.89.0 deduped
├─┬ style-loader@3.3.3
│ └── webpack@5.89.0 deduped
├─┬ stylus-loader@7.1.3
│ └── webpack@5.89.0 deduped
├─┬ terser-webpack-plugin@5.3.9
│ └── webpack@5.89.0 deduped
├─┬ ts-loader@9.5.1
│ └── webpack@5.89.0 deduped
├─┬ webpack-dev-server@4.15.1
│ ├─┬ webpack-dev-middleware@5.3.3
│ │ └── webpack@5.89.0 deduped
│ └── webpack@5.89.0 deduped
├─┬ webpack-subresource-integrity@5.1.0
│ └── webpack@5.89.0 deduped
└── webpack@5.89.0 deduped
As you can see, their webpack versions are different. I started to install [email protected] diretly into project which I had not installed as a main package. After installation, the webpack version for ngx-env/builder@ also changed to 5.76.1 and when I ran the project It was working correctly. But do you think this is the right way to solve the problem? Is there a better way to sync the webpack version?
It should be mentioned that I installed different versions of your package and that was the problem And that I checked this in my main project for now
from dotenv-run.
Related Issues (20)
- 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
- ng extract-i18n does not work properly with ESbuild HOT 8
- Broken nx demo link HOT 1
- Angular Errors are swallowed with esbuild on the console. HOT 2
- Replace .env file after build HOT 6
- ERROR TypeError: import.meta.env is undefined - not being replaced when building? HOT 1
- Environment files: printed twice
- runtime: true fail HOT 1
- Loading Priorities not working as documented with multiple files scenario: .env .secrets HOT 2
- Compatibility of @ngx-env/builder with Angular 18 HOT 21
- Multiple env files log correctly but have a different effect HOT 3
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 dotenv-run.