Module not found error: Can't resolve 'framework7/lite' when using Framework7-React

I’m seeing a strange issue all of a sudden after upgrading to Framework7 v6. It appeared to work fine at first, but now I’m seeing the following error when trying to build my PWA:

ERROR in ../common/temp/node_modules/.pnpm/[email protected]/node_modules/framework7-react/esm/shared/plugin.js
Module not found: Error: Can't resolve 'framework7/lite' in '/Users/raddish/Development/Hayl/common/temp/node_modules/.pnpm/[email protected]/node_modules/framework7-react/esm/shared'
 @ ../common/temp/node_modules/.pnpm/[email protected]/node_modules/framework7-react/esm/shared/plugin.js 1:0-41 25:19-29 38:4-14
 @ ../common/temp/node_modules/.pnpm/[email protected]/node_modules/framework7-react/esm/framework7-react.js
 @ ./src/js/app.js

I’ve tried reinstalling all dependencies, but to no avail.
If I start a brand new project with F7 CLI, that works… But that’s not using the same dependencies, as I’m using PNPM with RushJS in my main project.

Not sure if I’m missing something simple?

Not sure what is happening, maybe issue with pnpm? Haven’t used it

Fiddling about with the resolve.modules in the webpack config sorted the issue in the end.
I had to make sure that the local node_modules folder was above the generic node_modules, thus:

modules: [
    resolvePath('node_modules'),
    'node_modules'
]

I didn’t have anything listed in resolve.modules in webpack before.

Not sure why it suddenly started happening - but it appears to be fixed with this.

1 Like

Hi, total newbie here, where do I find this webpack config file that I need to modify? can’t get a blank app running with either Vue or React =\

(getting essentially the same problem with whatever framework, F7 CLI seems to create a project that can’t resolve paths properly)

I have the same problem
:frowning:

In index file you can set the import to this:

import Framework7 from ‘framework7/lite/bundle’;