1.15.0 Breaking Changes

NodeBB Development
  • @baris said in 1.15.0 Breaking Changes:

    Slugify module was added in 1.15.0, utils.slugify is being removed in 1.16.0. Check if you have slugify.js in public/src/modules and post how you are requiring the module.

    Hello @baris,

    I have slugify.js in public/src/modules .

    I require module in my library.js of my plugin like you said :

    const slugify = require('slugify');
    console.log(slugify('string to slugify'));

    and it gives :

    2020-12-12T11:40:23.482Z [5678/68409] - error: Error: Cannot find module 'slugify'
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
        at Function.Module._load (internal/modules/cjs/loader.js:562:25)
        at Module.require (internal/modules/cjs/loader.js:692:17)
        at require (internal/modules/cjs/helpers.js:25:18)


  • If you are using the core slugify module in plugins it is require.main.require('./src/slugify')

  • @baris Thanks, that was this ! This problem is solved now. 🙂

Suggested Topics

| | | |