Code Monkey home page Code Monkey logo

Comments (2)

chihab avatar chihab commented on June 12, 2024 1

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.

SeyedMostafaHosseinian avatar SeyedMostafaHosseinian commented on June 12, 2024

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)

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.