0
votes

I am getting this error repeatedly, after upgrading strapi to newer version. Earlier I managed to get rid of this error by installing strapi from scratch but now this is not possible as i have done lots of changes.

Please help, how can i resolve this

internal/modules/cjs/loader.js:583
throw err;
^

Error: Cannot find module 'strapi-utils'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/home/bapuom/programFiles/node-v10.15.0-linux-x64/node-v10.15.0-linux-x64/lib/node_modules/strapi/bin/strapi.js:13:17)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)

NOTE: I encountered same error while upgrading to strapi v3.0.0-alpha.21 and once again when I tried to upgrade my strapi to strapi v3.0.0-alpha.22, I am stuck with same error.

Please help.

Thanks, Amit

3
Did you follow migration guides ? - Jim LAURIE
Hi @JimLAURIE, yes, I did, but still I am getting this error under api/***/ files - KAmit
This error comes under /api/**/services/*.js file, for example see below line const filters = strapi.utils.models.convertParams('author', params); - KAmit

3 Answers

0
votes

You have to follow the steps in the documentation. Please check here

0
votes

Try to upgrade Strapi using:

sudo npm install -g strapi@beta
0
votes

Run npm i strapi-utils, this solved it for me.