-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolving Module Path Issues in Strapi: Adapting Plugin Code for Strapi Version 4.14.4 #19
Comments
facing the same issue. |
facing the same error. tried to fix with your solution but didn't work. any other way? |
Hi .. Yeah this is now a blocker
|
@jamesnyika I am also getting the same error did you get any solution? |
Hi @jamesnyika, fixed on my fork https://github.com/marcogermani87/strapi-plugin-fcm (working with strapi v4.24.3): npm i https://github.com/marcogermani87/strapi-plugin-fcm |
@marcogermani87 Thanks for this it worked for me! |
In the current version of Strapi (4.14.4), there is no lib folder inside the @strapi/strapi module, and I had to manually change the path (services files of the server folder) in the plugin module to "dist."
NEW:
const {
getPaginationInfo,
convertPagedToStartLimit,
shouldCount,
transformPaginationResponse,
} = require('@strapi/strapi/dist/core-api/service/pagination');
const { getFetchParams } = require('@strapi/strapi/dist/core-api/service');
OLD:
const {
getPaginationInfo,
convertPagedToStartLimit,
shouldCount,
transformPaginationResponse,
} = require('@strapi/strapi/lib/core-api/service/pagination');
const { getFetchParams } = require('@strapi/strapi/lib/core-api/service');
In my configuration, I'm using Yarn, and the server stopped with this error displayed on the console:
$ strapi develop
Error: Could not load js config file /var/www/vhosts/zen-chaplygin.62-138-11-62.plesk.page/httpdocs/node_modules/strapi-plugin-fcm/strapi-server.js: Cannot find module '@strapi/strapi/lib/core-api/service/pagination'
In the end, I managed to fix it temporarily with the solution above, but I don't know much about Strapi's structure, and I'm not sure if this could be helpful. However, I wanted to issue a warning about this.
The text was updated successfully, but these errors were encountered: