About this question
I'm trying to implement Platform Events into my LWC - I'm following these docs: lightning-emp-api docs.
When I try and import the empApi into my LWC I get the following error: (NB, it only occurs in the local dev server, when I deploy to my sandbox it works perfectly fine)
Could not load force/empApiInternal (imported by /Users//.local/share/sfdx/node_modules/@salesforce/lwc-dev-server-dependencies/vendors/dependencies-224/lightning-pkg/src/lightning/empApi/empApi.js): ENOENT: no such file or directory, open 'force/empApiInternal' My import :
import { subscribe, unsubscribe, onError, setDebugFlag, isEmpEnabled } from 'lightning/empApi'; I know I could just constantly deploy to my org during development, but thats such a bad experience, I want to make sure it the only option. How do I fix error Enoent No such file or directory open?