GithubHelp home page GithubHelp logo

Comments (8)

marvelsrp avatar marvelsrp commented on August 16, 2024 6

+1 Not work import library. Cannot find module 'rich-logger-decorator'.

from rich-logger-decorator.

mrosack avatar mrosack commented on August 16, 2024 2

I'm having problems using the library as well... import { ClassLogger } from "rich-logger-decorator"; gives me the error Cannot find module 'rich-logger-decorator' on compilation, and import { ClassLogger } from "rich-logger-decorator/dist/src"; gives the same error @chetmurphy mentions above at runtime.

from rich-logger-decorator.

mrosack avatar mrosack commented on August 16, 2024 2

Sure, here's a fresh angular cli project where i just try to add ClassLogger and it doesn't work. I think you need to compile your module to commonjs so it'll work with webpack (but I'm not an expert on these things).

https://github.com/mrosack/rich-logger-decorator-test

from rich-logger-decorator.

dormd avatar dormd commented on August 16, 2024

There are some problems with this configurations?

from rich-logger-decorator.

chetmurphy avatar chetmurphy commented on August 16, 2024

My understanding is that node module must in the commonjs format - not es6 or esnext.

I get the error:
rich-logger-decorator\src\index.ts:1
({"Object.":function(module,exports,require,__dirname,__filename,global,jest){export * from './interfaces'; for the keyword 'export'.

from rich-logger-decorator.

dormd avatar dormd commented on August 16, 2024

This error may be appeared when the npm isn't installed. Please add a plunker

from rich-logger-decorator.

nelisbijl avatar nelisbijl commented on August 16, 2024

changing main in package.json does the trick:
"main": "dist/src/index.js",

from rich-logger-decorator.

Roustalski avatar Roustalski commented on August 16, 2024

I have resolved the above mentioned issues, but I also changed the log output. I opened a PR.

Details:
https://github.com/Roustalski/rich-logger-decorator/blob/master/README.md

from rich-logger-decorator.

Related Issues (8)

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.