Cannot find module 'wix-storage-frontend'

import {session} from ‘wix-storage-frontend’;

is my code, it was working well but somehow for couple days, both editor x and wix editor gives me the error;

cannot find module ‘wix-storage-frontend’

any help is appriciated, thanks

Can you share your full code? I’ve tried to reproduce and the below code is working fine for me.

import {session} from 'wix-storage-frontend';

$w.onReady(function () {
    session.setItem("key", "value");
    console.log(session.getItem("key"));
});
1 Like

rest of the code is very simple and clean for sure,

i change;
import {session} from ‘wix-storage-frontend’;

with;
import {session} from ‘wix-storage’;

and the 'cannot find module ‘wix-storage-frontend’ error disappears.

and sometimes i dont get an error within same day with;
import {session} from ‘wix-storage-frontend’

its weird, somehow sometimes editor x and wix editor are not able to reach to the api.

Interesting. Unfortunately I can’t reproduce. If you encounter it again see if you can:

  1. Open your browser’s developer tools
  2. Navigate to the “Network” tab
  3. Look for any failing requests
  4. Check their headers
  5. Share their x-wix-request-id(s) here