Open muenzpraeger opened 4 years ago
This happens when you try to start it against lwc-recipies as well?
Yup, happens with lwc-recipes
as well.
Ok, so the issue happens with return this.loadModule(filename, realLoad, request, parent, isMain);
within the LazyLoader
for /Users/rwinkelmeyer/.local/share/sfdx/node_modules/jsdom/node_modules/request-promise-native/lib/rp.js
Thanks Rene, thats good we can work on upgrading that.
Wonder if everyones having this same issue?
@KrisGraySFDC I unblocked myself (for now), by upgrading the dependency myself. It’s not beautiful, but it works.
This issue has been automatically marked as type:bug-p3
because it has not had recent activity.
This issue has been linked to a new work item: W-7356676
@KrisGraySFDC Has the dependencies already been updated? Looks like this is not reproducible
I thought this was a transitive dependency, and thus we'd have to trace it back. By upgrading to the latest lwc you should have upgraded it.
This issue has been automatically marked as type:bug-p3
because it has not had recent activity.
This issue has been linked to a new work item: W-7651084
The fix for this was released as part of version 2.1.0
. Thanks for logging this.
Sadly I still seem to be getting this on 2.1.1:
sfdx force:lightning:lwc:start
Error: Unable to expose method "then"
at Object.plumbing.exposePromiseMethod (~/.local/share/sfdx/node_modules/jsdom/node_modules/request-promise-core/lib/plumbing.js:140:19)
at module.exports (~/.local/share/sfdx/node_modules/jsdom/node_modules/request-promise-core/configure/request2.js:57:83)
at Object.<anonymous> (~/.local/share/sfdx/node_modules/jsdom/node_modules/request-promise-native/lib/rp.js:15:1)
at Module._compile (~/.local/share/sfdx/client/7.62.1-309fe6da17/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at LazyLoader.loadModule (~/.local/share/sfdx/client/7.62.1-309fe6da17/node_modules/@salesforce/lazy-require/lib/LazyLoader.js:139:21)
at Function._load (~/.local/share/sfdx/client/7.62.1-309fe6da17/node_modules/@salesforce/lazy-require/lib/LazyLoader.js:115:29)
08:42:21.692 sfdx force:lightning:lwc:start
Updated sfdx and here are the versions of things I am running
sfdx plugins
@salesforce/lwc-dev-server 2.1.1
├─ @oclif/plugin-help 2.2.1
└─ @oclif/plugin-update 1.3.9
@pbattisson - I'm looking to fix this issue, but still trying to repro this locally. @muenzpraeger - Can you elaborate on "I unblocked myself (for now), by upgrading the dependency myself". Which dependency did you upgrade and the version?
That's looong time ago. If I recall correctly I upgraded jsdom
.
This issue has been automatically marked as type:bug-p3
because it has not had recent activity.
I run into same problem, "sfdx-cli/7.69.0-c7be45ae22 darwin-x64 node-v12.18.3" when run 'sfdx force:lightning:lwc:start'
at Object.plumbing.exposePromiseMethod (~/.local/share/sfdx/node_modules/jsdom/node_modules/request-promise-core/lib/plumbing.js:140:19)
at module.exports (~/.local/share/sfdx/node_modules/jsdom/node_modules/request-promise-core/configure/request2.js:57:83)
at Object.
I've been getting this same error also recently. The only thing I can think of that I've done is to install Jest so I could test my components. I have no test failures on the components and they install and run fine in my org.
Using both commands work fine. sfdx force:lightning:lwc:test:run and npx jest --coverage
Plugin @salesforce/lwc-dev-server 2.5.1 ├─ @oclif/plugin-update 1.3.9 └─ @oclif/plugin-help 2.2.3
VERSION sfdx-cli/7.69.0-c7be45ae22 darwin-x64 node-v12.18.3
10:47:45.554 sfdx force:lightning:lwc:start
Error: Unable to expose method "then"
at Object.plumbing.exposePromiseMethod (~/.local/share/sfdx/node_modules/jsdom/node_modules/request-promise-core/lib/plumbing.js:140:19)
at module.exports (~/.local/share/sfdx/node_modules/jsdom/node_modules/request-promise-core/configure/request2.js:57:83)
at Object.
Error: The local development server was not able to start.
Okay, after trying all kinds of things yesterday and today, I looked at that .local/share/sfdx folder I removed the sfdx folder and dev server still did not start, which is what I guessed would happen. I then installed the plugin again sfdx plugins:install @salesforce/lwc-dev-server and the local dev server is now working again. yippie-kay-yay!
I just started recently facing this issue. No real changes on my end. I didn't use local development server during the weekend and I came back and now it won't start up. It has been 4 days of it now working.
I've tried updating sfdx plugins as well.
This issue has been automatically marked as type:bug-p3
because it has not had recent activity.
As of today, I am facing this issue as well. Below are the commands I run on VS Code:
Command 1: sfdx plugins:update Command 1 Output: warning "@salesforce/lwc-dev-server > @rollup/plugin-alias@3.1.1" has unmet peer dependency "rollup@^1.20.0||^2.0.0". warning "@salesforce/lwc-dev-server > request-promise-native@1.0.9" has unmet peer dependency "request@^2.34". warning "@salesforce/lwc-dev-server > request-promise-native > request-promise-core@1.1.4" has unmet peer dependency "request@^2.34". sfdx-cli: Updating plugins... done
Command 2: sfdx force:lightning:lwc:start
Command 2 Output:
Error: Unable to expose method "then"
I have just created a blank project in VS Code and authorised a new scratch org. Then I try and start the Local Dev server and see this error. Below is the snapshot from my VS Code:
Meanwhile, I will manage with org based LWC development but would like to receive the fix once it is available.
Thanks!
Thanks!
This issue has been automatically marked as type:bug-p3
because it has not had recent activity.
It was working few weeks back, but again after update it is not working.
More Details: SFDX --version: sfdx-cli/7.74.1 win32-x64 node-v10.16.3 @salesforce/lwc-dev-server 2.5.1 ├─ @oclif/plugin-help 2.2.1 └─ @oclif/plugin-update 1.3.9 sfdx-dependency-plugin 2.0.1
Is there any timeline for this to get fixed. Any workaround ?
Commenting, Just to keep this open. Still I am facing this issue & not able to get any workaround.
@rajendrasnagar Could you try setting the env variable: SFDX_LAZY_LOAD_MODULES=false
? For example: SFDX_LAZY_LOAD_MODULES=false sfdx force:lightning:lwc:start
Hi @xyc , setting this variable doesn't work for me. However, FYI, I was previously using npm based cli. I uninstalled it and tried with standalone .exe. It didn't worked. Then, i uninstalled local dev plugins & re-installed it. Now, its working.
@rajendrasnagar Could you try setting the env variable:
SFDX_LAZY_LOAD_MODULES=false
? For example:SFDX_LAZY_LOAD_MODULES=false sfdx force:lightning:lwc:start
@xyc This did work for me.
Uninstalling the local dev plugin and re-installing it worked for me too. Thanks to @rajendrasnagar
This issue has been automatically marked as type:bug-p3
because it has not had recent activity.
I had the same issue. Tried to fix with sfdx plugins:update and it did not work. Then I uninstalled the plugin and installed it again and now everything is working fine.
This issue has been automatically marked as type:bug-p3
because it has not had recent activity.
Describe the bug On startup the plugin throws this error:
To Reproduce
sfdx force:lightning:lwc:start
Expected behavior It should start. ;-)
Additional context List of DX plugins that are installed.