GithubHelp home page GithubHelp logo

ERROR in node_modules/ng-monaco-editor/resize-sensor.service.d.ts(1,30): error TS2307: Cannot find module 'css-element-queries'. about ng-monaco-editor HOT 4 CLOSED

alauda avatar alauda commented on May 30, 2024 1
ERROR in node_modules/ng-monaco-editor/resize-sensor.service.d.ts(1,30): error TS2307: Cannot find module 'css-element-queries'.

from ng-monaco-editor.

Comments (4)

pengx17 avatar pengx17 commented on May 30, 2024 1

@Nexxado I am a relatively new npm package author. The reason not using regular dependency at the first place is that I thought there might be an issue if dependent package versions in different libraries collide. Imagine that Angular used a class based Token DI system but if libraries are using incompatible libraries, the runtime behavior would bite us. However it is an overkill if we put all dependencies as peer-dependencies. It should be a common issue since most npm libs are putting dependencies as normal dependencies. So why people still widely use regular dependencies since it may cause issues?

This reminds me that I might not be so familiar with how npm handles package dependencies and Google a good article here and reddit thread here.
I will issue a new PR today to revise the dependencies. By the way, thanks for reporting the issue and using this library.

from ng-monaco-editor.

ndraiman avatar ndraiman commented on May 30, 2024 1

@pengx17 I'm sorry if I came off negatively towards you, it was not my intention.

Thanks for your time and work, I really do appreciate it.

from ng-monaco-editor.

pengx17 avatar pengx17 commented on May 30, 2024

This lib is dependent on css-element-queries for resizing the editor. You may already saw it when you do npm install.

Other peer dependencies:

    "css-element-queries": "^1.0.2",
    "lodash": "^4.17.11",
    "lodash.debounce": "^4.0.8",
    "lodash.isequal": "^4.5.0",
    "monaco-editor": "^0.15.2",
    "zone.js": "^0.8.26"

from ng-monaco-editor.

ndraiman avatar ndraiman commented on May 30, 2024

@pengx17 Why is it a peer-dependency and not a regular dependency?
As a peer-dependency it means i have to maintain the correct version of it in my project instead of it coming with the library.

Npm install output:

npm WARN [email protected] requires a peer of css-element-queries@^1.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of lodash@^4.17.11 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of lodash.isequal@^4.5.0 but none is installed. You must install peer dependencies yourself.

from ng-monaco-editor.

Related Issues (18)

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.