Forum Discussion

Denizbaby's avatar
6 years ago

Error: Cannot find module 'object.defaults'

Hi All,

I am getting te below error while executing

li export-studio-plugin.


module.js:478
throw err;
^

Error: Cannot find module 'object.defaults'
at Function.Module._resolveFilename (module.js:476:15)
at Function.Module._load (module.js:424:25)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/root/.npm-global/lib/node_modules/gulp/node_modules/undertaker/lib/tree.js:3:16)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)

 

Thanks in advance,

Dbaby

5 Replies

  • Denizbaby,

    Try to Upgrade your Lithium SDK version using command

    npm install lithium-sdk@1.4.1

    After that runinstall gulp again,

    npm install gulp -g

    Then restart your computer. and create new project for the same project again.

    Let me know what you have found.

  • Denizbaby's avatar
    Denizbaby
    Guide
    6 years ago

    Hi Parshant,

    Thanks for the reply. SDK version is  1.4.1. Reinstalled  the  SDK.  But the same issue exists.

    Thanks,

      DVB

  • Denizbaby's avatar
    Denizbaby
    Guide
    6 years ago

    Hi Parshant ,

    The OS  is CentOS Linux release 7.6.1810 (Core).

    After removing  node_modules  from the create project and reinstalling  using "npm install" inside the project,  the export is working. Not sure why it is working. The problem is that everytime  create a project,  the same process needs to be executed.

     

    Thanks  for the time.

    Thanks,

    DVB

     

  • jeffshurtliff's avatar
    jeffshurtliff
    Boss
    5 years ago

    Thanks Denizbaby for sharing your workaround! 

    I just experienced this exact issue on our CentOS 8 (4.18.0-147.8.1.el8_1.x86_64) server, and removing the node_modules sub-directory and then running npm install from within the root repository directory (in my case, /home/lithium/sdk/) it allowed me to run the li export-studio-plugin command successfully.

    Thanks again!