Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

123
Views
Cannot read property 'string' of undefined in rollup result

I'm using Joi package to validate and replace parts of the input. Everything works ok but after the rollup I keep getting:

TypeError: Cannot read property 'string' of undefined

which point to:

internals$q.wrap = Joi.string()
.min(1)
.max(2)
.allow(false);

Joi import:

import Joi from 'joi';

dependencies:

"devDependencies": {
        "@rollup/plugin-commonjs": "^21.0.3",
        "@rollup/plugin-json": "^4.1.0",
        "@rollup/plugin-node-resolve": "^13.1.3",
        "rollup-plugin-typescript2": "^0.31.2",
    },
    "dependencies": {
        "joi": "^17.6.0"
    }

rollup.config.json:

import typescript from 'rollup-plugin-typescript2';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import config from '../xxx.config.json'
import json from '@rollup/plugin-json'

export default config.Endpoints.map(endpoint => {
    return {
        input: endpoint,
        output: [
         {
          dir: '../publish/',
          format: 'cjs'
         }
        ],
        external: [
        ],
        plugins: [
         typescript({
             tsconfigOverride: {
                 compilerOptions: {
                     module: "es2015",
                     declaration: false
                 }
             }
          }),
          resolve(),
          commonjs(),
          json(),
        ]
       }
    }
 );

Can someone help me with this?

Thanks.

I tried to upgrade rollup and it's plugins.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!