Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 02 06:16
    @ljharb banned @frank-dspeed
  • Apr 27 2018 01:23
    @MylesBorins banned @fjeddy
  • Feb 24 2016 08:26
    @rvagg banned @jonathanenbe
Keith Kelly
@kwkelly
Can anyone explain why most of this function never gets executed? https://repl.it/repls/FrightenedPastLogin#index.js
syed
@Smssyed8
erverMs\server.js:28:40)
at Module._compile (internal/modules/cjs/loader.js:1144:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1164:10)
at Module.load (internal/modules/cjs/loader.js:993:32)
at Function.Module._load (internal/modules/cjs/loader.js:892:14) {
code: 'MODULE_NOT_FOUND',
requireStack: [
do i need to do npm install to put my export to node modules
syed
@Smssyed8
when is it required to do npm install, every time i add a new export or do any change in my exported file i need to npm install?
and i need to delete node modules and npm install?
Adisa Collis
@OfficeHax_twitter

Hello!

There is a team at my company that wants to use an angular app on one domain to generate html (a list of search results with ul/li tags) and use a second domain to pull the search list into the 1st domains html. Is there a way to do this securely?

Githubber2021
@Githubber2021
Hi everyone!
Can anyone help me? Is there any way I can debug a TypeScript/Electron app in Visual Studio Code?
Every launch.json file I find is either broken, outdated or incompatible
Salathiel Genèse
@SalathielGenese
@Githubber2021 - Maybe you should stop trying, read the docs and seek understanding !?
Githubber2021
@Githubber2021
The snippets are broken as well
I downloaded the original example from the electron repo, and used even their launch.json from their tutorial. no success
Salathiel Genèse
@SalathielGenese
Hmmmmm, weird
Salathiel Genèse
@SalathielGenese
Consider reporting it on their GitHub repository...
If they got a reactive team (like node), they'll look into it very soon (like few hours from now)
Githubber2021
@Githubber2021
Thanks!
sgda021992
@sgda021992
can anyone tell me regex to check number greater than equal to 6
Jordan Harband
@ljharb
why would you use regex for that
sgda021992
@sgda021992
i want to put check in json
Jordan Harband
@ljharb
json doesn’t support regexes
sgda021992
@sgda021992
if you build form using json
Jordan Harband
@ljharb
maybe step back and explain what you’re trying to do, instead of asking about the way you think you should do it
sgda021992
@sgda021992
it will work
Jordan Harband
@ljharb
if you write code that treats some of your json strings as regexes, then sure
but that’s not a great idea
sgda021992
@sgda021992
i am using a library that accept json and generate form on UI
Jordan Harband
@ljharb
ok
and the only validation mechanism they support is regex? O.o
sgda021992
@sgda021992
so if we want to put any kind of validation that comes in json only
yeah
Jordan Harband
@ljharb
seems like you may want to pick a better library that supports something like json schema
sgda021992
@sgda021992
yeah but if you could help me with regex .... that will be apriciated
Jordan Harband
@ljharb
do you support leading zeroes?
ie is 05 less than 6?
what about negative numbers, or zero
or 00000
Brian Crowder
@crowder
Been staring at this document for a while -- it does not much discuss how the build/linkage is meant to work: https://nodejs.org/api/embedding.html <--- anyone have any hints for me?
Also: is there a better room for me to go to? :)
Jordan Harband
@ljharb
this is the best room on gitter; the best actual room is on freenode IRC, #node.js for regular questions and #node-dev for C++ questions
Brian Crowder
@crowder
@ljharb Thanks!
Brian Crowder
@crowder
@ljharb Don't suppose you've any hints, in the meantime?
Jordan Harband
@ljharb
only to prefer pure js modules :-)
Liviu Lupei
@liviulupei
Hi everyone, I'm working in the team who created Endtest.
I've dealt with all the possible corner cases for testing NodeJS apps, I've join this channel to help others.
https://endtest.io
TamashiKaizenカイゼン
@TamashiKaizen
Jordan Harband
@ljharb
class extends Error { get name() { return ‘custom’; } }?
TamashiKaizenカイゼン
@TamashiKaizen
@ljharb Hi, it seems like the name cannot be retrieved using custom class method.
TypeError: err.getName is not a function`
class AppError extends Error {
    constructor(message, statusCode){
        super(message);

        this.statusCode = statusCode;
        this.status = `${statusCode}`.startsWith('4') ? 'fail' : 'error';        
        this.isOperational = true;        

        Error.captureStackTrace(this, this.constructor);
    }

    setName(name) {
        this.name = name;
    }
    getName(){
        return this.name;
    }
}

module.exports = AppError;
Jordan Harband
@ljharb
not .getName. get name - a property getter
get name() {} means that new AppError().name will call that function