Code Monkey home page Code Monkey logo

lwc-dev-server-feedback's Introduction

npm (scoped)

LWC Local Development

This repository is being used to collect feedback and issues for LWC Local Development while it is in beta. The source code for this tool will soon be open source and issues will be migrated to the main repo.

For more information on LWC Local Development see the the documentation.

lwc-dev-server-feedback's People

Contributors

bpbuch avatar ekapner avatar hanelliot-sfdc avatar jag-j avatar krisgraysfdc avatar lcampos avatar mysticflute avatar ntotten avatar svc-scm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lwc-dev-server-feedback's Issues

CSS custom properties

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
A way to easily inject CSS custom properties to mimic the design tokens. I believe they must be injected by the localserver, but I guess what I am requesting is a way to override them (once standard design tokens are supported).

I would like to provide the custom css properties in the localdevserver.config.json like so

{
  // What namespace to use referencing your Lightning Web Components
  namespace: 'c',

  // Name of the component to load in the default container
  main: 'app',

  // Where are your component files. If you have a namespace, specify the directory the namespace folder is in.
  modulesSourceDirectory: 'src/',

  // Where are your static assets.
  staticResourcesDirectory: 'staticresources',

  // The address port for your local server. Defaults to 3333
  port: 3333,

  // Optional path to the custom labels file
  customLabelsFile: 'labels/CustomLabels.labels-meta.xml',

 designTokens: {
    brandAccessibleActive: 'red'
 }
}

Describe alternatives you've considered

my workaround to this problem is to modify the .localdevserver/public/assets/styles/styles.css file like so

@font-face {
    font-family: 'Neutraface Display';
    src: url('/assets/fonts/NeutrafaceDisplay.woff2') format('woff2'),
         url('/assets/fonts/NeutrafaceDisplay.woff')  format('woff');
    font-weight: 700;
    font-display: swap;
}

html {
 --lwc-brandAccessibleActive: red;
}

Additional context
none

Local dev server error with API version 48

Describe the bug
Few days ago Local development server stopped working.
Now when you try to run it locally you will get an error bellow.

Could you please check it out?
Maybe it's related to new api version (48)

To Reproduce
Steps to reproduce the behavior:

  1. run local server sfdx force:lightning:lwc:start
  2. See error:
    Error: Error compiling force/lds
    at Proxy.compile (/Users/ivan/.local/share/sfdx/node_modules/@webruntime/compiler/dist/commonjs/compiler/compiler.js:231:15)
    Caused by: Error: Could not resolve entry (force/lds)
    at error (/Users/ivan/.local/share/sfdx/node_modules/rollup/dist/rollup.js:3460:30)
    at /Users/ivan/.local/share/sfdx/node_modules/rollup/dist/rollup.js:21359:17
    at async Promise.all (index 0)
    at async Proxy.compile (/Users/ivan/.local/share/sfdx/node_modules/@webruntime/compiler/dist/commonjs/compiler/compiler.js:202:24)
    at async Promise.all (index 0)
    at async FileSystemResourceProvider.get (/Users/ivan/.local/share/sfdx/node_modules/@webruntime/compiler/dist/commonjs/resources/filesystem-resource-provider.js:49:32)
    at async webruntimeResources (/Users/ivan/.local/share/sfdx/node_modules/@webruntime/compiler/dist/commonjs/server/resource-middleware.js:37:36)

Expected behavior
Should run local server without any errors

"Bad Request" when trying to create a new EBikes case in LWC local dev server

Basically I'm walking through the LWC local dev server right now using, among other things, the EBikes LWC sample project. I opened the c-create-case component in the local dev server, filled out the form, and clicked the Submit button. The result was a "Bad Request" banner:

image

In the log I see:

[HPM] POST /api/services/data/v48.0/ui-api/records ~> https://drive-enterprise-4168-dev-ed.cs22.my.salesforce.com/

Note that above that I also see:

[HPM] GET /api/services/data/v48.0/ui-api/object-info/Case/picklist-values/012000000000000AAA ~> https://drive-enterprise-4168-dev-ed.cs22.my.salesforce.com/
Error: Route must be specified

While the timing is unrelated, it looks like perhaps the local dev server is having trouble communicating with my scratch org.

Note that the scratch org has the full local source pushed.

Hopefully that provides what you need, but if you do need additional info don't hesitate to ask.

Lightning Input Type = datetime does not render with LDS locally, but it does on the Server

Describe the bug
Lightning Input Type = datetime does not render with LDS locally, but it does on the Server.

On my computer it renders like below:
image

On the server it renders like below:
image

To Reproduce
use the following tag in your lwc and run it locally:

<lightning-input type="datetime" label="Due To" value={_date}></lightning-input>

Expected behavior
A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

  • OS: windows 10
  • Browser Chrome
  • Version Last Version

Local preview should allow to disable content justification

Is your feature request related to a problem? Please describe.
Currently the lwc-dev-server centers all content (by using slds-grid_align-center). While a centered view is great for single components it doesn't reflect the correct UI of components that i. e. use more real estate.

Describe the solution you'd like
Using the checkbox (or similar option) the user should be able to disable automated centering.

Can't start a server

I followed the steps and during the last step( starting a server) I got the error:
Warning: force:lightning:lwc:start is not a sfdx command.
The plugin '@salesforce/lwc-dev-server' was successfully installed.

Static resources with content type 'application/zip' not handled correctly

Describe the bug
When trying to fetch a file inside a zipped static resource file, the startup script only copies the zip file into the .localdevserver/public/assets/ folder.
File references inside the app are correct, but requesting them ends in a 500 server error:

Error: Route must be specified
    at Object.assert (/Users/Florian/.local/share/sfdx/node_modules/@webruntime/compiler/dist/commonjs/utils/assert.js:6:15)
    at generateHTML (/Users/Florian/.local/share/sfdx/node_modules/@webruntime/compiler/dist/commonjs/document/document-service.js:48:14)
    at /Users/Florian/.local/share/sfdx/node_modules/@webruntime/compiler/dist/commonjs/server/template-middleware.js:34:32
    at Layer.handle [as handle_request] (/Users/Florian/.local/share/sfdx/node_modules/express/lib/router/layer.js:95:5)
    at next (/Users/Florian/.local/share/sfdx/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/Users/Florian/.local/share/sfdx/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/Users/Florian/.local/share/sfdx/node_modules/express/lib/router/layer.js:95:5)
    at /Users/Florian/.local/share/sfdx/node_modules/express/lib/router/index.js:281:22
    at param (/Users/Florian/.local/share/sfdx/node_modules/express/lib/router/index.js:354:14)
    at param (/Users/Florian/.local/share/sfdx/node_modules/express/lib/router/index.js:365:14)

When you now create a new folder with the same name as the static resource, then copy all included (unzip) into this folder, it works.

This might be a more detailed version of #4

To Reproduce
Steps to reproduce the behavior:

  1. create project with a new lwc
  2. create zipped static resource with a js file inside
  3. create a component that loads the file via lightning/platformResourceLoader
  4. start lwc dev server
  5. Open the component page
  6. observe network tab of developer console
  7. 500 pops out for javascript file you tried to load from static resource

Expected behavior
The file inside the zipped resource should be loaded properly

Screenshots
image
image

Desktop:

  • MacOS 10.14.6
  • Browser chrome Version 77.0.3865.90
  • @salesforce/lwc-dev-server 1.0.4
    sfdx-cli/7.25.3-16d54c01ee darwin-x64 node-v10.15.3

View with VS Code Insiders

Is your feature request related to a problem? Please describe.
Clicking the View in VS Code button doesn't work if you only have VS Code Insiders installed.

Describe the solution you'd like
Give an option to open in VS Code Insiders. If I take the vscode://... URL and change it to vscode-insiders://... then it opens like expected.

Describe alternatives you've considered
Could install VS Code

More space on preview page

Is your feature request related to a problem? Please describe.
In my opinion, the currently available space for a component is really limited as it's only displayed inside the lightning-panel. That might results in displaying them differently than in Lightning Experience.

Describe the solution you'd like
A possibility might be to have a more simple environment for the component preview pages. Probably with more available space and with just a small navigation bar on the top of the page where you can go back to the main component overview page.

Describe alternatives you've considered
More panel width for preview panel.

Lightning Input Rich Text does not work Locally

Describe the bug
The tag is not working properly when developing locally. When I save and the preview is reloaded it displays the following message:

image

When I push the same src code to my scratch org it works without any problem.
image

Here is the part of my component where I use this tag:

<div if:true={isEdit}>
       <lightning-input-rich-text value={message}></lightning-input-rich-text>
</div>

To Reproduce
Try to use the following line in your lwc component.

Expected behavior
It is expected to render like it does in the server.

Desktop (please complete the following information):

  • OS: windows 10
  • Browser Chrome
  • Version Last Version

LocalDevServer doesn't render components that inherit from LightningElement

Summary

I have a base class export default class StatedElement extends LightningElement that is a LWC. I have other components that extend that base component such as export default class WidgetEnrichment extends StatedElement These components do not show in the LWC Dev Server, so none of my apps render. :(

Steps To Reproduce:

  1. Create a component (Component1)
  2. Create another component (Component2) that extends Component1
  3. Component1 will show in the browser, Component2 will not

Expected result

Component2 shows in the browser

Actual result

Component2 did not show in the browser

Additional information

VS Code Version: 1.40

SFDX CLI Version: sfdx-cli/7.32.0 darwin-x64 node-v13.1.0

OS and version: OS X Catalina

Local preview should allow background color selection

Is your feature request related to a problem? Please describe.
An essential feature within orgs are custom themes that allow customers to define UI parameters for the overall appearance of their org.

Currently the lwc-dev-server only presents a grey background. It should be added that the developer can set at minimum custom background color, at best the same background (image) as in their org.

Describe the solution you'd like

  • As default the dev server should use a white background, as that's the default in orgs.
  • In addition the user should be able to set a custom background color (to reflect to their orgs colors).

Standalone javascript file static resources not imported correctly

Ran across an issue with static resources that are standalone javascript files.

This code fails in local development:

import jsResource from '@salesforce/resourceUrl/myFile';
import {loadScript} from 'lightning/platformResourceLoader';
// -- snip ---
// inside connectedCallback
loadScript(this, jsResource);

With this error:

Error: Route must be specified
    at Object.assert (/Users/me/.local/share/sfdx/node_modules/@webruntime/compiler/dist/commonjs/utils/assert.js:6:15)
    at generateHTML (/Users/me/.local/share/sfdx/node_modules/@webruntime/compiler/dist/commonjs/document/document-service.js:48:14)
    at /Users/me/.local/share/sfdx/node_modules/@webruntime/compiler/dist/commonjs/server/template-middleware.js:34:32
    at Layer.handle [as handle_request] (/Users/me/.local/share/sfdx/node_modules/express/lib/router/layer.js:95:5)
    at next (/Users/me/.local/share/sfdx/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/Users/me/.local/share/sfdx/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/Users/me/.local/share/sfdx/node_modules/express/lib/router/layer.js:95:5)
    at /Users/me/.local/share/sfdx/node_modules/express/lib/router/index.js:281:22
    at param (/Users/me/.local/share/sfdx/node_modules/express/lib/router/index.js:354:14)
    at param (/Users/me/.local/share/sfdx/node_modules/express/lib/router/index.js:365:14)

The same code works fine in a real org.

A workaround is to add ".js" to the end of the import, like so:

loadScript(this, jsResource + '.js');

However, this workaround then breaks the code on the real org.

So you can have it one way, or the other.

Other workarounds are things like using a static resource zip file instead of a standalone file, or detecting that you are in local dev mode and injecting the suffix or not.

getPicklistValuesByRecordType wire adapter returns HTML/XML escaped data

Describe the bug
When using getPicklistValuesByRecordType wire adapter to fetch picklist values from org, it seems to return HTML/XML escaped data. It results to incorrect behaviour if you have ampersands or other special character in picklist values.

E.g. Picklist value "Tom & Jerry" comes as "Tom &amp; Jerry"

To Reproduce
Steps to reproduce the behavior:

  1. Have a picklist fields with picklist values containing special characters, such as ampersand, quotation mark...
  2. Use getPicklistValuesByRecordType wire adapter in you lightning web component code to retrieve picklist values from the picklist.
  3. Run LWC dev server and display the component.
  4. Debug data retrieved in browser console or display the via lightning-combobox (or other element).
  5. Deploy the same component to the org and debug the same code.
  6. See the error - compare the data retrieved by the component on localhost and the org. Local component gets the picklist value XML escaped while component on org gets values in correct shape (unescaped).

Expected behavior
getPicklistValuesByRecordType wire adapter should have consistent behaviour on both LWC dev server and Salesforce org.

Screenshots
Picklist field setup:
image

Picklist values displayed on LWC Dev Server:
image

Picklist values displayed on org:
image

Raw data on LWC Dev Server:
image

Desktop:

  • OS: macOs Catalina
  • Browser: Chrome (v78), Firefox (v69)
  • SFDX CLI version: 7.33.2
  • LWC Dev Server version: 1.0.8

Additional context
LWC Dev Sever connects to dev sandbox (API version 47). It is the same sandbox I was deploying the test component to.

Other wire adapters or UI API related libraries may be affected.

ProductCard component is not rendering completely.

Describe the bug
Followed the steps as mentioned in this blog - https://developer.salesforce.com/blogs/2019/10/announcing-lwc-local-development-beta.html.

Unable to render the productCard component completely as shared in the above blog.

However, I am able to run few simple components and those are working well. But when tried running the productCard component. It's unable to render it completely.

Also when making any change in the productCard component its not reflecting back in the browser.

To Reproduce
Steps to reproduce the behavior:

  1. After starting the dev-server
  2. Open the productCard component in the localhost
  3. Component gets partial rendered and you would find the broken image.
  4. Open the productCard.js in VS Code and set the recordId
  5. Localhost gets reloaded, with the same screen as 3rd step

Expected behavior
It should display the bike image and other details as shared in the blog.

Screenshots
Screen Shot 2019-10-13 at 9 16 47 PM
Screen Shot 2019-10-13 at 9 13 11 PM

Desktop (please complete the following information):

  • OS: macOS Mojave 10.14.6
  • Browser: Chrome
  • Version: 77.0.3865.90

Wire not working

Component:

import getListingTypesBySite from '@salesforce/apex/List_BuyBox_Item.getListingTypesBySite';
 @wire(getListingTypesBySite, {})
 listingTypeInfo({data, error}) {
     if (data) this.listing_types = data;
 }

Apex:

public class List_BuyBox_Item {
    @AuraEnabled(cacheable=true)
    public static Map<String, Map<String, String>> getListingTypesBySite() {
         Map<String, Map<String, String>> listingTypes = new Map<String, Map<String, String>>();
         
         for (Listing_Type__c listing : [SELECT 
                                                        Name__c,
                                                        ML_ID__c,
                                                        Site_Id__c 
                                                FROM
                                                        Listing_Type__c
                                                WHERE
                                                        Inactive__c = False
                                                ]) {
             if (listingTypes.containsKey(listing.site_id__c) == false) listingTypes.put(listing.site_id__c, new Map<String, String>());
             listingTypes.get(listing.site_id__c).put(listing.ml_id__c, listing.name__c);
         }
         
         return listingTypes;
    }
}

Response from http://localhost:3333/api/apex/execute: 500 internal error -> error parsing or finding aura config: window.Aura not found

Does wire not work from local development?

sfdx plugins:install @salesforce/lwc-dev-server Error

Hi Team,

Received the following error when installing the lwc-dev-server plugins.

C:\Workspace\SakthiDevOrg\TechforceLWCLocal\TechforceLWC>sfdx plugins:install @salesforce/lwc-dev-server
Error: tunneling socket could not be established, cause=Client network socket disconnected before secure TLS connection was established

VS_Code_Error1

Error while installing " sfdx plugins:install @salesforce/lwc-dev-server"

Describe the bug
error An unexpected error occurred: "https://registry.yarnpkg.com/@salesforce/lwc-dev-server-dependencies/-/lwc-dev-server-dependencies-1.0.47.tgz: ESOCKETTIMEDOUT".

To Reproduce
Steps to reproduce the behavior:

Go to SFDX project in terminal

Make sure you are not logged into any scratch org

run the following command : sfdx plugins:install @salesforce/lwc-dev-server

Successfully validated digital signature for @salesforce/lwc-dev-server.
Finished digital signature check.
warning @salesforce/lwc-dev-server > @lwc/style-compiler > cssnano > autoprefixer > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning @salesforce/lwc-dev-server > @lwc/style-compiler > cssnano > postcss-merge-rules > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning @salesforce/lwc-dev-server > @lwc/style-compiler > cssnano > postcss-merge-rules > caniuse-api > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning @salesforce/lwc-dev-server > @lwc/style-compiler > cssnano > postcss-merge-rules > postcss-selector-parser > [email protected]: I wrote this module a very long time ago; you should use something else.
warning @salesforce/lwc-dev-server > @salesforce/command > @oclif/test > fancy-test > @types/[email protected]: This is a stub types definition. nock provides its own type definitions, so
you do not need this installed.
warning @salesforce/lwc-dev-server > @salesforce/core > @salesforce/ts-sinon > sinon > @sinonjs/formatio > [email protected]: This package has been deprecated in favour of @sinonjs/samsam
error An unexpected error occurred: "https://registry.yarnpkg.com/@salesforce/lwc-dev-server-dependencies/-/lwc-dev-server-dependencies-1.0.47.tgz: ESOCKETTIMEDOUT".
Installing plugin @salesforce/lwc-dev-server... !

Desktop (please complete the following information):
Windows 10

Note : Tried 4-5 times, and installation get stuck with this error.

Static Resource containing images is not loading locally only on the Server

I have a series of icons stored as a public static resource. I zipped the files and upload it to Salesforce. Then I retrieved it to my sfdx project folder using the sfdx pull command to use it locally. The link is generated correctly but the image does not render. But when I push my code to the scratch org I can see the images being rendered. Follow bellow an image showing the same lwc in the org and locally. You will see that the image loads in the server but not locally.

Screenshots
image

image

**Desktop

  • OS: Windows 10
  • Browser: Chrome
  • Version: Last version

Lightning Input type = datetime is not working properly on the server

Describe the bug
Lightning Input type = datetime is not working properly on the server. When you click on the time box to insert a time the options are not showing up on top of the field. Like in the picture below:

image

But if I apply a zoon I can start to see the options:
image

I was not sure if I could put this bug here, but I found it so I decided to document.

To Reproduce
Use a lightning-input type=datetime
Click on the time part of this input
Check that the options are not on top of the page. It is hidden.

Desktop (please complete the following information):

  • OS: windows 10
  • Browser Chrome
  • Version Last Version

Component layout is not consistent with Salesforce org

Describe the bug
I have a lightning web component that I embed in a tab using an aura component wrapper. When I open the tab in the Salesforce org, my LWC expands to use all available width. When I view the LWC using the local development server, it uses as little width as possible. It would be nice if the layout was consistent with the Salesforce org.

To Reproduce
fooWrapper aura component

<aura:component implements="force:appHostable">
    <c:foo />
</aura:component>

foo lightning web component

<template>
    <div style="background-color:red">foo</div>
</template>

Expected behavior
On the local development server, components should expand to use all available width, as they do in the Salesforce org.

Screenshots
componentlayout

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version: 77.0.3865.90

LWC local dev server should respect project folder configured in sfdx-project.json

Summary

When starting Lightning Web Server it searches for the Lightning Web Component in src/main/default/lwc folder instead of src/lwc

Steps To Reproduce:

  1. Configure packageDirectories.path as src instead of default force-app
  2. Start local dev server by running sfdx force:lightning:lwc:start command

Expected result

Local dev server should search for components in src/lwc folder.

Actual result

Local dev server searches for components in src/main/default/lwc folder.

Additional information

Feel free to attach a screenshot.

SFDX CLI Version sfdx-cli/7.30.13-9e204762d5

@salesforce/lwc-dev-server 1.0.8

Not able to install the server

Describe the bug
A clear and concise description of what the bug is.

While trying to install the LWC local server following the instructions mentioned on https://developer.salesforce.com/tools/vscode/articles/lwc/localdev

I encountered following error -

Error: yarn add @salesforce/lwc-dev-server@latest --non-interactive --mutex=file :C:/Users/Dell/AppData/Local/sfdx/yarn.lock --preferred-cache-folder=C:/Users/De ll/AppData/Local/sfdx/yarn --check-files exited with code 1 at ChildProcess.forked.on (C:/Users/Dell/AppData/Local/sfdx/client/7.21.0-96 4f56bd1a/node_modules/@oclif/plugin-plugins/lib/yarn.js:31:28)

Please let me know if there is anything I could do to resolve this issue?

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Error when starting local dev server.

Summary

Unable to start local dev server.

Steps To Reproduce:

  1. Install lwc-dev-server plugin.
  2. Clone lwc-recipes.git
  3. Configure DevHub.
  4. Create scratch org and push up code.
  5. Start local dev server.

Expected result

Local dev server should start on port 3333.

Actual result

Starting LWC Local Development.
    Dev Hub Org: DevHub
    Scratch Org: [email protected]
    Api Version: 47.0
unhandledPromiseRejection: Error: Unable to start LocalDevServer: Error: modulePaths is not a directory: /Users/xxxx/.local/share/sfdx/client/7.30.13-9e204762d5/bin/node

VS Code Version:
1.39.2

SFDX CLI Version:
sfdx-cli/7.30.13-9e204762d5 darwin-x64 node-v10.15.3

OS and version:
macOS 10.15.1

500 Internal Server Error

Describe the bug
I just started getting 'transport.js:32 POST http://localhost:3333/api/apex/execute 500 (Internal Server Error)' while fetching data from apex method.

Error returned from server:
originalTarget:
body:
message: "apex://OpportunityController: No apex action available for OpportunityController.getOptyDetails"
proto: Object
ok: false
status: 400
statusText: "Bad Request"

!!! Note that I am not getting this error developing/running in the Sandbox !!!

To Reproduce
Steps to reproduce the behavior:
Make a request to fetch data from ApexController.ApexMethod through @wire service. EX Payload:

import getOptyDetails from '@salesforce/apex/OpportunityController.getOptyDetails'; recordId = 'some_id'; @wire(getOptyDetails, { optyId: '$recordId' }) wiredOpportunityRecord({ error, data }) {

Dev Console View:
{"namespace":"","classname":"OpportunityController","method":"getOptyDetails","params":{"Id":"some_id"},"cacheable":true}

Expected behavior
This has been working just fine up until now. Receive data through @wire service.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version: 78.0.3904.87

Unable to install lwc-dev-server

i am trying to install in my personal laptop but i am getting below error

Error: Unable to update lock within the stale threshold

PS C:\Users\Sidhartha Mohapatra\Documents\SFDC-Codes\RegDev02> sfdx plugins:install @salesforce/lwc-dev-server
Successfully validated digital signature for @salesforce/lwc-dev-server.
Finished digital signature check.
warning @salesforce/lwc-dev-server > @lwc/style-compiler > cssnano > autoprefixer > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning @salesforce/lwc-dev-server > @lwc/style-compiler > cssnano > postcss-merge-rules > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning @salesforce/lwc-dev-server > @lwc/style-compiler > cssnano > postcss-merge-rules > caniuse-api > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning @salesforce/lwc-dev-server > @lwc/style-compiler > cssnano > postcss-merge-rules > postcss-selector-parser > [email protected]: I wrote this module a very long time ago; you should use something else.
warning @salesforce/lwc-dev-server > @salesforce/command > @oclif/test > fancy-test > @types/[email protected]: This is a stub types definition. nock provides its own type definitions, so you do not need this installed.
warning @salesforce/lwc-dev-server > @salesforce/core > @salesforce/ts-sinon > sinon > @sinonjs/formatio > [email protected]: This package has been deprecaC:\Users\Sidhartha Mohapatra\AppData\Local\sfdx\client\7.18.0-ee5dc8194c\node_modules\yarn\lib\cli.js:78070
compromised = compromised || function (err) { throw err; };

Error: Unable to update lock within the stale threshold
at options.fs.utimes (C:\Users\Sidhartha Mohapatra\AppData\Local\sfdx\client\7.18.0-ee5dc8194c\node_modules\yarn\lib\cli.js:77992:66)
at FSReqWrap.args [as oncomplete] (fs.js:140:20)
Installing plugin @salesforce/lwc-dev-server... !
Error: yarn add @salesforce/lwc-dev-server@latest --non-interactive --mutex=file:C:/Users/Sidhartha Mohapatra/AppData/Local/sfdx/yarn.lock --preferred-cache-folder=C:/Users/Sidhartha Mohapatra/AppData/Local/sfdx/yarn --check-files exited with code 1
at ChildProcess.forked.on (C:/Users/Sidhartha Mohapatra/AppData/Local/sfdx/client/7.18.0-ee5dc8194c/node_modules/@oclif/plugin-plugins/lib/yarn.js:31:28)
PS C:\Users\Sidhartha Mohapatra\Documents\SFDC-Codes\RegDev02> sfdx update
sfdx-cli: Updating CLI from 7.18.0-ee5dc8194c to 7.27.0-714f62f9c1... - 35.0 MB/35.2 MB
^CTerminate batch job (Y/N)? Y
PS C:\Users\Sidhartha Mohapatra\Documents\SFDC-Codes\RegDev02> sfdx --version
sfdx-cli/7.27.0-714f62f9c1 win32-x64 node-v10.15.3

lightning/breadcrumbs is imported but could not be resolved

Hello,

Today I wanted to develop new lwc on local environment but started to get this issues when starting the server

[0] [rollup] 'lightning/breadcrumbs' is imported by ../../.local/share/sfdx/node_modules/@salesforce/lwc-dev-server/modules/localdevserver/preview/preview.html, but could not be resolved – treating it as an external dependency
[0] [rollup] 'lightning/breadcrumb' is imported by ../../.local/share/sfdx/node_modules/@salesforce/lwc-dev-server/modules/localdevserver/preview/preview.html, but could not be resolved – treating it as an external dependency
[0] [rollup] 'lightning/spinner' is imported by ../../.local/share/sfdx/node_modules/@salesforce/lwc-dev-server/modules/localdevserver/preview/preview.html, but could not be resolved – treating it as an external dependency

Error: Error compiling force/lds
at Proxy.compile (/Users/myUser/.local/share/sfdx/node_modules/@webruntime/compiler/dist/commonjs/compiler/compiler.js:231:15)
Caused by: Error: Could not resolve entry (force/lds)
at error (/Users/myUser/.local/share/sfdx/node_modules/rollup/dist/rollup.js:3460:30)
at /Users/myUser/.local/share/sfdx/node_modules/rollup/dist/rollup.js:21359:17
at async Promise.all (index 0)
at async Proxy.compile (/Users/myUser/.local/share/sfdx/node_modules/@webruntime/compiler/dist/commonjs/compiler/compiler.js:202:24)
at async Promise.all (index 0)
at async FileSystemResourceProvider.get (/Users/myUser/.local/share/sfdx/node_modules/@webruntime/compiler/dist/commonjs/resources/filesystem-resource-provider.js:49:32)
at async webruntimeResources (/Users/myUser/.local/share/sfdx/node_modules/@webruntime/compiler/dist/commonjs/server/resource-middleware.js:37:36)
[view__mainLayout.js] Done in 44 ms
0] [rollup] 'lightning/verticalNavigation' is imported by ../../.local/share/sfdx/node_modules/@salesforce/lwc-dev-server/modules/localdevserver/componentsPanel/componentsPanel.html, but could not be resolved – treating it as an external dependency
[0] [rollup] 'lightning/verticalNavigationSection' is imported by ../../.local/share/sfdx/node_modules/@salesforce/lwc-dev-server/modules/localdevserver/componentsPanel/componentsPanel.html, but could not be resolved – treating it as an external dependency
[0] [rollup] 'lightning/verticalNavigationItemIcon' is imported by ../../.local/share/sfdx/node_modules/@salesforce/lwc-dev-server/modules/localdevserver/componentsPanel/componentsPanel.html, but could not be resolved – treating it as an external dependency
[0] [rollup] 'lightning/icon' is imported by ../../.local/share/sfdx/node_modules/@salesforce/lwc-dev-server/modules/localdevserver/resourcesPanel/resourcesPanel.html, but could not be resolved – treating it as an external dependency

[view__home.js] Done in 1367 ms
Writing /Users/myUser/dev/sfdc_retail_metadata/.localdevserver/public/webruntime/view/eaf2cb0c78/dev/en_US/home.js...
[lds] Done in 18 ms
Error: Error compiling force/lds
at Proxy.compile (/Users/myUser/.local/share/sfdx/node_modules/@webruntime/compiler/dist/commonjs/compiler/compiler.js:231:15)
Caused by: Error: Could not resolve entry (force/lds)
at error (/Users/myUser/.local/share/sfdx/node_modules/rollup/dist/rollup.js:3460:30)
at /Users/myUser/.local/share/sfdx/node_modules/rollup/dist/rollup.js:21359:17
at async Promise.all (index 0)
at async Proxy.compile (/Users/myUser/.local/share/sfdx/node_modules/@webruntime/compiler/dist/commonjs/compiler/compiler.js:202:24)
at async Promise.all (index 0)
at async FileSystemResourceProvider.get (/Users/myUser/.local/share/sfdx/node_modules/@webruntime/compiler/dist/commonjs/resources/filesystem-resource-provider.js:49:32)
at async webruntimeResources (/Users/myUser/.local/share/sfdx/node_modules/@webruntime/compiler/dist/commonjs/server/resource-middleware.js:37:36)
[lds] Done in 3 ms

So I wasnt able to see any of the lwc,

working environment:

OSX Catalina 10.15.2
node: 13.1.0
npm: 6.13.1

any thoughts?

Setting "port" in configuration file is not working

Setting the "port" key in localdevserver.config.json to something like 8008 still results in the server coming up at port 3333.

Using the command line flag:

sfdx force:lightning:lwc:start -p 8008

works as expected however.

emp API does not work

Describe the bug
I have work components on my salesforce playgroun using empApi. When I load them locally I get the following errors. There are two different components doing two different things but both using empApi and both working when running on a Scratch org.

image

image

Display ShowToastEvent

Is your feature request related to a problem? Please describe.
this.dispatchEvent(new ShowToastEvent({..})) doesn't display toast while in dev server.

Describe the solution you'd like
this.dispatchEvent(new ShowToastEvent({..})) should display a toast while in dev server.

Describe alternatives you've considered
Currently utilizing console.log(...) or pushing the code to sandbox to test.

Additional context

sfdx plugins:install @salesforce/lwc-dev-server

Installing plugin @salesforce/lwc-dev-server... \ info There appears to be trouble with your network connection. Retrying...

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Warning: force:lightning:lwc:start is not a sfdx command

Describe the bug
I cannot start the LWC dev server.

To Reproduce
Steps to reproduce the behaviour:

  1. update CLI using command sfdx update
  2. install plugin sfdx plugins:install @salesforce/lwc-dev-server
  3. authorised a sandbox org
  4. start server sfdx force:lightning:lwc:start
  5. See error

Warning: force:lightning:lwc:start is not a sfdx command.

Expected behaviour
It should start then local server

Desktop (please complete the following information):

  • OS: Microsoft Windows 10 Home, Version 10.0.17763 Build 17763
  • Browser chrome
  • Version 77.0.3865.120 (Official Build) (64-bit)

Support multiple source module directories

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

  • The local dev server assumes that all LWCs are sourced from the same directory.

Describe the solution you'd like
In the localdevserver.config.json, it would be helpful if the modulesSourceDirectory could take an array of paths to source LWCs from so I don't have to flatten my directory structure in order to use all of my project's LWCs in the local dev server.

"modulesSourceDirectory": [ "src/nFORCE/ui-navigation/lwc/", "src/nFORCE/common/lwc/" ]

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

  • Flatten the directory structure or put all the project's LWCs in a single directory.

Additional context
Add any other context or screenshots about the feature request here.

  • No additional context. The local dev server is a game-changer! Huge fan!

Was not able to run the Local Dev server

Describe the bug
A clear and concise description of what the bug is.
While trying to install the LWC local server following the instructions mentioned on https://developer.salesforce.com/tools/vscode/articles/lwc/localdev

I encountered following error -

Error: yarn add @salesforce/lwc-dev-server@latest --non-interactive --mutex=file :C:/Users/Dell/AppData/Local/sfdx/yarn.lock --preferred-cache-folder=C:/Users/De ll/AppData/Local/sfdx/yarn --check-files exited with code 1 at ChildProcess.forked.on (C:/Users/Dell/AppData/Local/sfdx/client/7.21.0-96 4f56bd1a/node_modules/@oclif/plugin-plugins/lib/yarn.js:31:28)

Please let me know if there is anything I could do to resolve this issue?
To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Changes to static resources aren't rebuilt to .localdevserver

Describe the bug
If I edit a static resource in a project folder, there is activity in the terminal, and the browser refreshes. However, the change is not reflected in the browser, because the files in the .localdevfolder are not rebuilt.

To Reproduce
Requires a component that uses a static resource - I used an image.

  1. Load the component on the local dev server
  2. Make a change to the static resource that will result in a change that can be seen in the browser - for example, if the resource is an image, modify the image contents
  3. Wait for the browser to refresh
  4. Note that the change is not reflected
  5. Look at the static resource in the .localdevserver - note that the

Expected behavior
The file should be rebuilt to the .localdevserver folder so that when the browser refreshes, changes are shown.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: MacOS Mojave
  • Browser Chrome

Additional context
Possible dupe of #4 ?

pubsub is not working

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Create two LWC components.
  2. Subscribe the first component to an event.
  3. Fire an event from the second component.
  4. The first component is not capturing the event.

Expected behavior
The component that is registered to the event should handle the event when the event is fired from another component.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version 78.0.3904.87

Additional context
Add any other context about the problem here.
This is working in the Sandbox.

Error while installing LWC local dev server in VS code

I am getting the below error in VS code while installing lwc local dev server

Microsoft Windows [Version 10.0.16299.1420]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\xxx\Desktop\hello\abc>sfdx plugins:install @salesforce/lwc-dev-server
Successfully validated digital signature for @salesforce/lwc-dev-server.
Finished digital signature check.
warning @salesforce/lwc-dev-server > @lwc/style-compiler > cssnano > postcss-merge-rules > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning @salesforce/lwc-dev-server > @lwc/style-compiler > cssnano > autoprefixer > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning @salesforce/lwc-dev-server > @lwc/style-compiler > cssnano > postcss-merge-rules > caniuse-api > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning @salesforce/lwc-dev-server > @lwc/style-compiler > cssnano > postcss-merge-rules > postcss-selector-parser > [email protected]: I wrote this module a very long time ago; you should use something else.
warning @salesforce/lwc-dev-server > @salesforce/command > @oclif/test > fancy-test > @types/[email protected]: This is a stub types definition. nock provides its own type definitions, so you do not need this installed.
warning "@salesforce/lwc-dev-server > @webruntime/compiler > @lwc/[email protected]" has
incorrect peer dependency "@lwc/[email protected]".
warning Error running install script for optional dependency: "C:\Users\xxx\AppData\Local\sfdx\node_modules\dtrace-provider: Command failed.
Exit code: 1
Command: node scripts/install.js
Arguments:
Directory: C:\Users\xxx\AppData\Local\sfdx\node_modules\dtrace-provider
Output:
'node' is not recognized as an internal or external command,
operable program or batch file."
error C:\Users\xxx\AppData\Local\sfdx\node_modules@salesforce\lwc-dev-server: Command failed.
Exit code: 1
Command: node script/postinstall-build.js
Arguments:
Directory: C:\Users\xxx\AppData\Local\sfdx\node_modules@salesforce\lwc-dev-server
Output:
'node' is not recognized as an internal or external command,
operable program or batch file.
Installing plugin @salesforce/lwc-dev-server... !
Error: yarn add @salesforce/lwc-dev-server@latest --non-interactive --mutex=file:C:/Users/xxx/AppData/Local/sfdx/yarn.lock --preferred-cache-folder=C:/Users/xxx/AppData/Local/sfdx/yarn --check-files exited with code 1
at ChildProcess.forked.on (C:/Users/xxx/AppData/Local/sfdx/client/7.23.1-ced0ec4940/node_modules/@oclif/plugin-plugins/lib/yarn.js:31:28)

LWC unable to import another LWC, possible namespace issue.

Describe the bug
Loading a LWC that references another LWC in its markup results in an error:

[0] [rollup] 'c/sampleLWC' is imported by force-app/main/default/lwc/anotherLWC/anotherLWC.js, but could not be resolved – treating it as an external dependency

Both LWCs are in the same project/force-app/main/default/lwc directory. Our package will be a managed package with a namespace, but is currently unreleased. I've tried adding the namespace to the localdevserver.config.json, but it does not change the results.
{ "namespace": "ourSampleNamespace" }

To Reproduce
Steps to reproduce the behavior:

  1. Start lwc-dev-server.
  2. Click on a LWC that references another LWC in its markup.
  3. Observe error, for example:
    image
  4. Observe error in lwc-dev-server terminal window, for example:

[0] [rollup] 'c/packetBuilderPacketSelectorModal' is imported by force-app/main/default/lwc/packetBuilder/packetBuilder.html, but could not be resolved – treating it as an external dependency

Expected behavior
The selected LWC loads with its dependent LWCs.

Desktop (please complete the following information):

  • macOS Mojave v10.14.6
  • Chrome v77

Lightning Card is not rendering the borders locally

Describe the bug
Lightning Card does not display properly locally. Locally the card is not rendering the borders.

image

In an Org it renders everything properly.
image

Desktop (please complete the following information):

  • OS: windows 10
  • Browser Chrome
  • Version Last Version

Dev server keeps reloading while typing

Describe the bug
Whenever I type a character in my component's js file, the dev server will recompile and reload the component in the browser. This makes typing really laggy. It is also completely pointless because it keeps reloading the unchanged file from the disk. Once I save the file it will reload with the changes as expected. The component does not refresh everytime I type a character in the css file, it only happens with the js file.

To Reproduce

  1. Start dev server
  2. View a component in your browser
  3. Edit the component's js file in VSCode
  4. Note that the component keeps reloading in the browser as you type in VSCode

Expected behavior
The component should not be reloaded until you save changes.
A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version: 77.0.3865.90

Namespaces not resolved in SObject schema when developing a managed package

Describe the bug
When an org is developing a managed package, the schema imports do not respect this, creating a mismatch between javascript properties returned by Apex proxy (namespaced) and what frontend expects (no namespace)

To Reproduce
Steps to reproduce the behavior:

  1. Create a production dev org
  2. Enable a managed package development and specify a namespace
  3. Create a custom object
  4. Create LWC component
  5. Import a field in the component like so:
import MY_FIELD from "@salesforce/schema/My_Object__c.My_Field__c";
  1. Use the object reference e.g. to call Apex or LDS
  2. Run the code in local server being connected to an org

Expected behavior
The schema import is resolved as it is in the Org - with the namespace. (e.g. the fieldApiName of the object MY_FIELD returns my_namespace__My_Field__c)

Actual behavior
The schema import is resolved without the namespace. (e.g. the fieldApiName of the object MY_FIELD returns My_Field__c).

Screenshots
N/A

Desktop (please complete the following information):

  • OS: [e.g. iOS] macOS 10.15 (19A583)
  • Browser [e.g. chrome, safari] Chrome
  • Version [e.g. 22] Version 77.0.3865.90 (Official Build) (64-bit)

Smartphone (please complete the following information):
N/A

Additional context
Add any other context about the problem here.

lightning-formatted-rich-text - does not render in LDS

Describe the bug
When using the lightning-formatted-rich-text tag in a lwc component, the rich text is not rendered as rich text in the LWC Local Development Server, but renders correctly when used in a sandbox.

To Reproduce
Steps to reproduce the behavior:

  1. create a lwc with a single tag with value bound to a js variable with a basic rich text string,
    eg.

<h1>Ad eas enim res ab Epicuro praecepta dantur.</h1><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. At multis malis affectus. <b>Sint ista Graecorum;</b> Si longus, levis dictata sunt. Duo Reges: constructio interrete. An haec ab eo non dicuntur? <a href="http://loripsum.net/" target="_blank">Quid turpius quam sapientis vitam ex insipientium sermone pendere?</a></p><h2><b>Non enim iam stirpis bonum quaeret, sed animalis.</b></h2><p>Quare ad ea primum, si videtur; Sed virtutem ipsam inchoavit, nihil amplius. Quid ergo attinet gloriose loqui, nisi constanter loquare? Quid ad utilitatem tantae pecuniae? Tecum optime, deinde etiam cum mediocri amico. <i>Dici enim nihil potest verius.</i> Non autem hoc: igitur ne illud quidem.</p><ul><li>Qui-vere falsone, quaerere mittimus-dicitur oculis se privasse;</li><li>Quae fere omnia appellantur uno ingenii nomine, easque virtutes qui habent, ingeniosi vocantur.</li><li>Si quicquam extra virtutem habeatur in bonis.</li><li>Ut enim consuetudo loquitur, id solum dicitur honestum, quod est populari fama gloriosum.</li><li>Quod cum ita sit, perspicuum est omnis rectas res atque laudabilis eo referri, ut cum voluptate vivatur.</li></ul><p><br></p>

  1. load the lwc in dev or sandbox, text is formatted

image

  1. load the lwc in the LDS and the text is not formatted

image

Expected behavior
Expect that the tag would work and format the rich text string appropriately

Desktop (please complete the following information):

  • OS: W10
  • Browser Chrome
  • Version : current version

Additional context
Seems like rich text may not be supported at all yet, based on this reported issue...

#5

Local Dev Server doesn't start when no network connection exists.

Describe the bug
Local dev server doesn't start in a pure offline scenario.

To Reproduce

  1. Disconnect all networks.
  2. Start local dev server from command line.

Expected behavior
The local dev server should start. When developing components that don't rely on any data from an org I expect to have at least access to them.

Routing to component folder when project has multiple directory structure

I am not sure if this use case is just not supported, but I have a project split into multiple folders under force-app/ like this:

src/
  force-app/
    main/
      ...legacy non-lwc stuff
    community-app/
      default/lwc

where all LWC are under a different directory from main/.

My first thought was to set localdevserver.config.json like such:

{
"namespace": "c",
"main": "communityApp",
"modulesSourceDirectory": "./force-app/community-app/",
"staticResourcesDirectory": "staticresources",
}

but this still results in an error:

Error: ENOENT: no such file or directory, scandir '/home/uncleoptimus/Code/Salesforce/AHH-CCA-Portal/force-app/cca-portal/main/default/lwc'

Is there a way for me to configure and successfully direct the local server to the components under force-app/community-app/default?

Untrapped error when user is not authenticated

Describe the bug
$ sfdx force:lightning:lwc:start
triggers an untrapped error when user is not logged into the scratch org :

To Reproduce
Steps to reproduce the behavior:

  1. Go to SFDX project in terminal

  2. Make sure you are not logged into any scratch org

  3. run the following command :
    $ sfdx force:lightning:lwc:start

  4. see error in terminal
    Use of this plugin is subject to the Salesforce.com Program Agreement.
    By installing this plugin, you agree to the Salesforce.com Program Agreementhttps://trailblazer.me/terms
    and acknowledge the Salesforce Privacy Policyhttps://www.salesforce.com/company/privacy.jsp.

(node:58521) UnhandledPromiseRejectionWarning: StatusCodeError: 401 - "[{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]"
at new StatusCodeError (/Users/rupert/.local/share/sfdx/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/Users/rupert/.local/share/sfdx/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/Users/rupert/.local/share/sfdx/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/Users/rupert/.local/share/sfdx/node_modules/request/request.js:185:22)
at Request.emit (events.js:189:13)
at Request. (/Users/rupert/.local/share/sfdx/node_modules/request/request.js:1161:10)
at Request.emit (events.js:189:13)
at IncomingMessage. (/Users/rupert/.local/share/sfdx/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:277:13)
at IncomingMessage.emit (events.js:194:15)
(node:58521) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:58521) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Starting LWC Local Development.
Dev Hub Org: [email protected]
Scratch Org: [email protected] - Error authenticating to your scratch org. Make sure that it is still active by running sfdx force:org:list --all.
Api Version: 47.0
(node:58521) UnhandledPromiseRejectionWarning: StatusCodeError: 400 - "{"error":"invalid_grant","error_description":"expired access/refresh token"}"
at new StatusCodeError (/Users/rupert/.local/share/sfdx/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/Users/rupert/.local/share/sfdx/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/Users/rupert/.local/share/sfdx/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/Users/rupert/.local/share/sfdx/node_modules/request/request.js:185:22)
at Request.emit (events.js:189:13)
at Request. (/Users/rupert/.local/share/sfdx/node_modules/request/request.js:1161:10)
at Request.emit (events.js:189:13)
at IncomingMessage. (/Users/rupert/.local/share/sfdx/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:277:13)
at IncomingMessage.emit (events.js:194:15)
(node:58521) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

Expected behavior
Should just report a user friendly error message

Screenshots

Desktop (please complete the following information):

  • OS: macOS

Smartphone (please complete the following information):

Additional context
SFDX version :
sfdx-cli/7.26.0-9118501918 darwin-x64 node-v10.15.3

SFDX plugins :
@salesforce/lwc-dev-server 1.0.4
├─ @oclif/plugin-help 2.2.1
└─ @oclif/plugin-update 1.3.9

mo-dx-plugin 0.2.5
sfdx-migration-automatic 1.5.0
sfdx-waw-plugin 1.5.0
shane-sfdx-plugins 4.6.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.