Open asparkam opened 7 years ago
Thanks for report. Probably, It seem that app-root-path return undefined. This is a bug. I will look into it.
https://github.com/azu/localstorage-ponyfill/blob/8fb4476652bfdf366031fc247d2ad37cc14f7120/src/localstorage-ponyfill.ts#L43 ( node-localstorage rquire store path )
You can avoid this issue by storeFilePath
options.
const localStoraged = createLocalStorage({
storeFilePath: __dirname + "/local-storage"
});
localStorage.setItem("key", "12321321");
When i try to use localstorage in my isomorphic app:
In sever console is:
Searching for this issue shows widespread problems with different libraries where path strings are being asserted instead of returning empty string if null. Suggestions were to downgrade to Node 5 or 4 from 6 (I do not wish to so this).
NPM version: 3.10.8 Node version: v6.9.1 Node architecture: x64 OS: Windows 7