Git Product home page Git Product logo

Comments (6)

helix46 avatar helix46 commented on July 30, 2024 4

Build gives error:
ERROR in node_modules/@angular/core/src/render3/ng_dev_mode.d.ts(9,11): error TS2451: Cannot redeclare block-scoped variable 'ngDevMode'.

from jodit-angular.

helix46 avatar helix46 commented on July 30, 2024 1

Work around...
I've had to delete the node_modules folder so often that I've made a script to go in package.json scripts:

"fix-jodit-node-modules": "fix-jodit-node-modules.bat",

Contents of fix-jodit-node-modules.bat (for windows of course):
IF EXIST .\node_modules\jodit-angular\node_modules (
rd .\node_modules\jodit-angular\node_modules /S /q
)

from jodit-angular.

Shrewd avatar Shrewd commented on July 30, 2024

In my case, using wrong angular versions made the error occur.
Angular versions must match this library version, currently 5.2.11
I used npm update to do so, and then ng-bootstrap caused errors since it now requires angular 6.
Using npm install --save @ng-bootstrap/[email protected] did the trick

from jodit-angular.

Iskuzer avatar Iskuzer commented on July 30, 2024

Build gives error:
ERROR in node_modules/@angular/core/src/render3/ng_dev_mode.d.ts(9,11): error TS2451: Cannot redeclare block-scoped variable 'ngDevMode'.
--
Same problem with angular 6

from jodit-angular.

Raiper34 avatar Raiper34 commented on July 30, 2024

Same problem Angular 6...

from jodit-angular.

garluk avatar garluk commented on July 30, 2024

Work around...
I've had to delete the node_modules folder so often that I've made a script to go in package.json scripts:

"fix-jodit-node-modules": "fix-jodit-node-modules.bat",

Contents of fix-jodit-node-modules.bat (for windows of course):
IF EXIST .\node_modules\jodit-angular\node_modules (
rd .\node_modules\jodit-angular\node_modules /S /q
)

This worked to me with Node.js 12.10: https://stackoverflow.com/a/57866165

In your package.json, add:

"scripts": {
    "postinstall": "path_to_your_script"
  }

Then, create a script in your project with the following:

const fs = require('fs');

fs.rmdirSync('node_modules/jodit-angular/node_modules', {recursive: true});

This will run when you npm install, so you don't have to manually delete the folder.

from jodit-angular.

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.