Giter VIP home page Giter VIP logo

trailheadapps / ecars Goto Github PK

View Code? Open in Web Editor NEW
176.0 12.0 129.0 18.08 MB

Sample application for Lightning Web Components and Salesforce Platform runtime and compute capabilities. Part of the sample gallery. Electric car manufacturer use case. Get inspired and learn best practices.

Home Page: https://developer.salesforce.com

License: Creative Commons Zero v1.0 Universal

JavaScript 83.61% HTML 6.08% CSS 1.22% TypeScript 3.17% Apex 5.89% Shell 0.01% Procfile 0.02%
salesforce lightning-web-components heroku kafka mqtt change-data-capture

ecars's Introduction

eCars

CI Workflow codecov lerna

ecars-logo

Sample car sales and service application. Pulsar is a fictitious electric car manufacturer company. This application helps Pulsar to sell cars on-site, and through their customer-facing website. Event-driven patterns allow to build loosely coupled integrations using multiple programming languages and systems. Regardless of the industry you work in, this app demonstrates how to build rich and immersive user experiences with the connected compute and runtime capabilities of the Salesforce Platform.

eCars Architecture Diagram

Table of Contents

Installation

Prerequisites

You will need the following to deploy this sample app.

  • git (download here)
  • node >= v12 and < v19 (download here)
  • Salesforce Dev Hub
    • If you don't have one, sign up for a Developer Edition org and then follow the instructions to enable Dev Hub.
  • sfdx CLI >= 7.11.0 (download here)
  • Heroku account (signup)
  • heroku CLI (download here)

Disclaimer: You'll need to have a paid Heroku Account and be subscribed to the Heroku Eco and Heroku Postgres Mini plans, for more information visit the Heroku Pricing page.

Automated Deploy

This project consists of multiple "apps" consolidated into one monorepo so that they are easier to deploy. The simplest way to configure and deploy all the apps is to run the following commands. The scripts/ecarsDeploy.js file is what automates all the deploys and integrates them with various configuration values.

The ecarsDeploy.js script will create and deploy code to a Salesforce scratch org and then deploy four Heroku apps along with some Postgres databases.

$ sf org login web -d -a DevHub  # Authenticate using your Dev Hub org credentials
$ heroku login  # Login with your Heroku account (or create one)
$ git clone https://github.com/trailheadapps/ecars.git
$ cd ecars/scripts
$ npm install
$ cd ..
$ node scripts/ecarsDeploy.js

If instead you want to perform all the deploy and configuration steps manually, see the Manual Deploy section below.

When the deploy is finished follow the last few instructions provided by the script, and then go to Demo Highlights below.

If you'd like to perform all the steps in the deploy script manually, you can follow the instructions below.

Manual Deploy

The below steps do everything the Automated Deploy does. It's recommended that you use the Automated Deploy to make the deploy easier for you and reduce the chance of error. If at any time, you are having a problem with the below steps and would like to start over, follow the steps in the Teardown section below.

  1. Authenticate with the sfdx and heroku CLI commands and get the eCars code onto your computer.

    $ sf org login web -d -a DevHub  # Authenticate using your Dev Hub org credentials
    $ heroku login  # Login with your Heroku account (or create one)
    $ git clone https://github.com/trailheadapps/ecars.git
  2. Create a scratch org

    $ sf org create scratch -d -f config/project-scratch-def.json -a ecars -v DevHub
  3. Generate a password for the scratch org user. Save both the username and password for later.

    $ sf org generate password -o ecars
  4. Generate a Security Token for the scratch org user. Run the following command and then click Reset Security Token. You will receive the security token in an email. This will be used later for the SF_TOKEN config var in the Heroku apps.

    $ sf org open -o ecars -p /lightning/settings/personal/ResetApiToken/home
  5. (Optional) Activate the Pulsar_Bold theme on the Themes and Branding page by running the following command:

    $ sf org open -o ecars -p /lightning/setup/ThemingAndBranding/home
  6. Deploy and configure the Heroku MQTT application

    1. Click the Heroku Deploy Button to deploy the application to Heroku. Provide a unique application name to be used as [MQTT APP NAME] below. Leave all other inputs as the defaults.

      Deploy

  7. Deploy and configure the Heroku Streaming application

    1. Click the Heroku Deploy Button to deploy the streaming data application to Heroku. Provide a unique application name to be used as [STREAMING APP NAME] below. Leave all other inputs as the defaults.

      Deploy

    2. Create a Heroku Postgres database and attach it to the application

      $ heroku addons:create heroku-postgresql:mini --app=[STREAMING APP NAME] --wait
    3. Provision the Heroku Postgres database

      $ heroku run 'cd packages/ecars-db && npx sequelize db:migrate' --app=[STREAMING APP NAME]
    4. Scale the application's dynos

      $ heroku ps:scale web=1:eco sensor-simulator=1:eco sensor-persistence=0:eco --app=[STREAMING APP NAME]
    5. Link with the Heroku MQTT app

      $ heroku config:set MQTT_BROKER_URL=[MQTT APP URL] --app=[STREAMING APP NAME]

      Note: Make sure this URL has the Secure WebSockets Protocol wss:// instead of https://. eg: wss://example.herokuapp.com

  8. Deploy and configure the Heroku Progressive Web Application (PWA)

    1. Click the Heroku Deploy Button to deploy the progressive web application to Heroku. Provide a unique application name to be used as [PWA NAME] below. Leave all other inputs as the defaults.

      Deploy

    2. Create a Heroku Postgres database and attach it to the application

      $ heroku addons:create heroku-postgresql:mini --app=[PWA APP NAME] --wait
    3. Initialize database tables

      $ heroku run node scripts/createPostgresTable.js --app=[PWA APP NAME]
    4. Generate VAPID public and private keys for web push notifications. Save them for the next command and also the next Heroku application deploy.

      $ npx web-push generate-vapid-keys
    5. Set config vars

      $ heroku config:set VAPID_PUBLIC_KEY=[VAPID PUBLIC KEY] VAPID_PRIVATE_KEY=[VAPID PRIVATE KEY] SF_USERNAME=[ORG USERNAME] SF_PASSWORD=[ORG USER'S PASSWORD] SF_LOGIN_URL=[ORG LOGIN URL] SF_TOKEN=[ORG USER'S TOKEN] --app=[PWA NAME]
  9. Deploy and configure the Heroku Microservices Application

    1. Click the Heroku Deploy Button to deploy the microservices application to Heroku. Provide a unique application name to be used as [MICROSERVICES APP NAME] below. Leave all other inputs as the defaults.

      Deploy

    2. Attach [STREAMING APP NAME]'s Heroku Postgres database to the Microservices application.

      $ heroku addons:attach [STREAMING APP NAME]::DATABASE --as=DATABASE --app=[MICROSERVICES APP NAME]
    3. Set config vars

      $ heroku config:set VAPID_PUBLIC_KEY=[VAPID PUBLIC KEY] VAPID_PRIVATE_KEY=[VAPID PRIVATE KEY] SF_USERNAME=[ORG USERNAME] SF_PASSWORD=[ORG USER'S PASSWORD] SF_TOKEN=[ORG USER'S TOKEN] SF_LOGIN_URL=[ORG LOGIN URL] --app=[MICROSERVICES APP NAME]
  10. Deploy source to the Saleforce scratch org

    1. Update the Salesforce source in the following files, replacing example.herokuapp.com with the domain of the Heroku apps you created in the previous steps.

      1. Update with streaming application domain: force-app/main/default/cspTrustedSites/WebSockets.cspTrustedSite-meta.xml
      2. Update with streaming application domain: force-app/main/default/lwc/liveData/liveData.js
      3. Update with microservices application domain: force-app/main/default/namedCredentials/Heroku_App.namedCredential-meta.xml
    2. From the ecars root directory, push the source to the scratch org

      $ sf project deploy start
    3. Assign permissionsets to the scratch org user

      $ sf org assign permset -n ecars
      $ sf org assign permset -n Walkthroughs
    4. Load sample data into the scratch org

      $ sf data tree import -p ./data/data-plan.json
  11. Now go to Demo Highlights to learn about what you just deployed and why it's interesting!

Teardown

To delete everything created by the automated script or manual deploy instructions, run the following commands.

$ sf org delete scratch -p -o ecars
$ heroku apps:destroy --app=[MQTT APP NAME]
$ heroku apps:destroy --app=[STREAMING APP NAME]
$ heroku apps:destroy --app=[PWA NAME]
$ heroku apps:destroy --app=[MICROSERVICES APP NAME]

Demo Highlights

  • The Car Configurator component, built using Lightning Web Components and Lightning Data Service, enables a Pulsar salesperson to configure a car for onsite customers and to generate a PDF using a custom built Heroku Service showing the customer’s selected car configuration options.
  • Within Service Cloud, a Pulsar service technician can view live diagnostic car data such as current MPGe, % battery remaining, and range remaining to diagnose an issue with a customer's car. Data is sent from the car using MQTT and streamed to Salesforce over WebSockets.
  • The Progressive Web App can run in the browser, or as a native app on desktop client (as above). By leveraging Lightning Web Components and Lightning Base Components on npm, Pulsar quickly reused components from the employee app to create this customer-facing app. To upload data from the customer-facing app into Salesforce, the new Composite Graph API is used to map out complex data models, and commit changes within a single transaction.
  • An event-driven architecture using Change Data Capture allows Pulsar to synchronize data with other systems in real time. The empApi Lightning web component is used to receive change events for Vehicle__c record changes. Pulsar can also leverage the same technology to support their sales reps with real-time data updates across devices.
  • Pulsar maintains a single source of truth, from customer lead to car configuration options, by securely storing data for all aspects of its business in Salesforce.

Additional Resources

Archive IoT Car Diagnostic Data with Postgres

Looking at real-time car diagnostic data is useful, but often it's useful to be able to look at historical data. You can persist this data to a Postgres database by enabling the sensor-persistence process type.

Note that we have not enabled this by default because it will quickly consume the maximum 10,000 rows allowed in the mini Heroku Postgres plan. If you enable the sensor-persistence process type for more than a few hours, you should use a larger Heroku Postgres plan.

Development

Please see CONTRIBUTION.md

ecars's People

Contributors

albarivas avatar crcastle avatar dependabot[bot] avatar julianduque avatar msrivastav13 avatar muenzpraeger avatar pozil avatar satyasekharcvb 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

ecars's Issues

sfdx user plugin is broken after an update

Summary

After updating sfdx to the latest it broke the user plugin making ecarsDeploy script fail

Additional information

We need to make sure the user plugin is installed and working before attempting a deploy

Add step titles for CodeTour

There are no step titles in CodeTour. Let's add some for a more user-friendly learning experience.
Simply add a title property on each step of your code tours.

Screen Shot 2020-11-06 at 09 17 35

PDF webservice not working

I have deployed everything correctly but when I try to call the PDF webService from the UI, it returns a 503 error.

image

Problems with the Automated deploy

Summary

Using the automated deploy script to deploy and running into this issue - deployment fails with this error - spawnSync sfdx ENOENT

Steps To Reproduce:

  1. Installed all the prerequisites - VS code / git / sfdx / heroku cli
  2. Executed the automated deployment instructions - node scripts/ecarsDeploy.js
  3. The script executes the - scratch org is setup successfully - when deploying to Scratch org-
    after this result - *** Pushing source to scratch org
  4. Error is seen - spawnSync sfdx ENOENT

unable to install and use the sample on the scratch org.

Please let me know for questions.

Update to Heroku Eco & Mini plans

Summary

Heroku Free planes are sunsetting on Nov 28, we should update the deployment script and instructions to use the new plans instead.

Suggested Solution

  • Update manual instructions
  • Update deploy script

Alternative Solutions

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Error in DreamTX ’20 Demo (Automated) setup.

Summary

I have been trying to set up the eCars demo. I am encountering an error at the Automated Deploy step.

Steps To Reproduce:

  1. As I execute the ecarsDeploy.js script; the following error comes up:

Expected result

The script will create and deploy code to a Salesforce scratch org and then deploy four Heroku apps along with some Postgres databases.

Actual result

spawnSync sfdx ENOENT

Additional information

Untitled

Feel free to attach a screenshot or code snippets.

Set "SF_LOGIN_URL" parameter to the "ecars-pwa" Heroku app

What is missing from the application? Please describe.
Currently the "ecars-pwa" app can only works with a Scratch Org as the Salesforce Login Url is hardcoded in the "api.js" file as below:
const conn = new jsforce.Connection({
loginUrl: 'https://test.salesforce.com'
});

Describe the solution you'd like
It could be great to modify the code based on a parameter (as this is already the case for the "microservice" app).
I made the modification on my side as below:

const conn = new jsforce.Connection({
loginUrl: process.env.SF_LOGIN_URL
});

It would really help using the app with a Salesforce Production Org. Thank you

Cyril Verhaest - Salesforce Distinguished Architect

Update README regarding SFDX versioning

What is missing from the application? Please describe.
There seems to be an issue when the SFDX CLI version on the client side drifts past a certain version. This causes an error of the script not being able to find the sandbox org and will proceed to fail. This can be difficult to troubleshoot because there seems to be two ways to grab a version number of SFDX

If the command sfdx plugins --core is ran, it will give a list like this:

@oclif/plugin-autocomplete 0.1.5 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.2.0 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.9.1 (core)
@oclif/plugin-update 1.3.10 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.4.3 (core)
alias 1.1.2 (core)
analytics 1.12.1 (core)
auth 1.3.0 (core)
config 1.1.9 (core)
generator 1.1.3 (core)
salesforcedx 50.2.0 (core)
├─ templates 50.1.0 (core)
├─ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
├─ custom-metadata 1.0.10 (core)
├─ apex 0.1.1 (core)
└─ salesforce-alm 50.2.0 (core)
sfdx-cli 7.77.0 (core)

At the bottom of this list, there's a version of salesforcedx of 50.2.0 (which is what the README is assuming the user is checking to use); however, the sfdx-cli also gives a version number of 7.77.0. Keep in mind, the documentation only says the "CLI" should be a certain version, and when I ran this for the first time, saw the error, I used the command sfdx -v, it gave me the version of 7.77.0 -- instantly confusing me

Describe the solution you'd like
We should standardized on which versioning we should use. Is it the sfdx-cli versioning? Or the salesforcedx one? If so, we just need to be a bit more clear on which line item needs to be the proper version instead of only saying "CLI >= insert version here ", it could be " salesforcedx >= 50.2.0 ; please run sfdx plugins --core to see the current version) "

Deploy script fails using default MacOS installed git

What is missing from the application? Please describe.

The README lists git as a dependency, but it should be more specific. Git >= 2.22.0 is required because of the use of --show-current flag.

It's hard to find out for sure, but it looks like the initial release of MacOS Catalina (10.15) shipped with a git version <= 2.22.0. However, git installed as of MacOS 10.15.7 includes git 2.24.3. Not sure where in between 10.15.0 and 10.15.7 git was bumped above 2.22.0.

❯ /usr/bin/git --version
git version 2.24.3 (Apple Git-128)

Git 2.22.0 was released June 7, 2019.

Describe the solution you'd like

  • Update README to specify git >= 2.22.0 is required
  • Add check in scripts/ecarsDeploy.js for git >= 2.22.0 before using git's --show-current flag

Describe alternatives you've considered

  • Just update the README, not the deploy script

Additional context

A user ran into this and they didn't notice or know what to do with the error from their git client saying --show-current flag is unknown to git.

Unable to push the source code to the scratch org

Summary

When I try to push the ecars source code to the newly created scratch org. I am getting the below error:

force-app\main\default\flexipages\Case_Record_Page_with_right_sidebar.flexipage-meta.xml We couldn't retrieve the design time component information for component c:liveData.

Steps To Reproduce:

  1. Clone the ecars application.
  2. Create a new scratch org from the dev hug org.
  3. Push the source code to the scratch org.

Expected result

Should be able to push the source code.

Actual result

Unable to push the source to the scratch org.

Additional information

ecars error 1

Error on push eCars code to an Scratch org

Hi folks,
I've clone the eCars repository to follow the Modern App Development youtube series and I faced the issue below when I tried to push the code to the scratch org:

Cannot specify a startsWith attribute for this language

It's happening in the Car_Options__c.object-meta.xml

Thanks!

Vehicle 'Change Status' not Updated on 'Inventory' without Browser Refresh

What is missing from the application? Please describe.

  1. Log into Salesforce (Pulsar app)
  2. Go to Inventory (e.g. /lightning/n/Inventory)
  3. Click on any of the vehicles (e.g. V-000000)
  4. Click on "Change Status" to make the status different
  5. Return to Inventory and the change will not be displayed (without a browser refresh)

I am guessing it has to do with Lightning caching and not knowing the record itself has changed.

Describe the solution you'd like
Ideally Inventory view would refresh the status when it changes, maybe it doesn't have to be dynamic (as it is when you change status on an individual vehicle and it updates any other user of the change in real time) but at least when you come back to the page it would show the updated status.

Additional context
If I get any time to dig into it and get it resolved, I will push information back here.

Setup script fails when deploying PWA app

Summary

Automated setup script fails in the 4th step (PWA app setup).
This appears to be due to an issue with a npm/node version mismatch.

Salesforce Org Type

Scratch Org

Steps To Reproduce

Run the automated setup script.

Current Behavior

Setup script fails when setting up PWA app.
This appears to be an issue with the npm/node version (see full logs for more details):

ERROR: npm v9.1.1 is known not to run on Node.js v12.22.12.

Expected Behavior

Setup script works :)

Relevant Log Output

*** Setting up PWA Heroku app (step 4 of 5)
*** Generating Vapid keys
*** Creating Heroku app ecars-pwa-aged-dawn-01
*** Adding Node.js Buildpack
*** Creating Heroku Postgres database
*** Initializing Heroku Postgres database
*** Setting remote configuration parameters
*** Writing .env file for local development
VAPID_PUBLIC_KEY=BM0MV0IWIPsvj8sUpvvMlP-kpXW_qAmjJCxVye3cyXdm60B4O1wbe6ez-ikX221ZTDMr2VI07NROIu59E7VJ0hI
VAPID_PRIVATE_KEY=h4Agp1bJME43plbNM8WvZ1mbdrGdKOvFA8OKnr8Hkw0
[email protected]
[email protected]
SF_PASSWORD=bapc6hmqbmc[B
SF_LOGIN_URL=https://test.salesforce.com
DATABASE_URL=postgres://bzikliedoaspqq:007a0f44e26269c806e78b2bfd55c460b63df154ebe98d3069cbe5ea80039e59@ec2-34-227-120-79.compute-1.amazonaws.com:5432/dnsr4guqder4r
*** Pushing app to Heroku
remote: Compressing source files... done.        
remote: Building source:        
remote: 
remote: -----> Building on the Heroku-22 stack        
remote: -----> Using buildpacks:        
remote:        1. https://github.com/lstoll/heroku-buildpack-monorepo.git        
remote:        2. heroku/nodejs        
remote: -----> Monorepo app detected        
remote:       Copied apps/ecars-pwa to root of app successfully        
remote: -----> Node.js app detected        
remote:                
remote: -----> Creating runtime environment        
remote:                
remote:        NPM_CONFIG_LOGLEVEL=error        
remote:        NODE_VERBOSE=false        
remote:        NODE_ENV=production        
remote:        NODE_MODULES_CACHE=true        
remote:                
remote: -----> Installing binaries        
remote:        engines.node (package.json):  >=10.13.0 <13.0.0        
remote:        engines.npm (package.json):   >=6.4.1        
remote:        engines.yarn (package.json):  >=1.9.4        
remote:                
remote:        Resolving node version >=10.13.0 <13.0.0...        
remote:        Downloading and installing node 12.22.12...        
remote:        Bootstrapping npm >=6.4.1 (replacing 6.14.16)...        
remote:        ERROR: npm v9.1.1 is known not to run on Node.js v12.22.12. You'll need to        
remote:        upgrade to a newer Node.js version in order to use this version of npm. This        
remote:        version of npm supports the following node versions: `^14.17.0 || ^16.13.0 ||        
remote:        >=18.0.0`. You can find the latest version at https://nodejs.org/.        
remote:                
remote:        ERROR:        
remote:        /tmp/build_b40717f4/.heroku/node/lib/node_modules/npm/lib/utils/exit-handler.js:22        
remote:          const hasLoadedNpm = npm?.config.loaded        
remote:                                   ^        
remote:                
remote:        SyntaxError: Unexpected token '.'        
remote:            at wrapSafe (internal/modules/cjs/loader.js:915:16)        
remote:            at Module._compile (internal/modules/cjs/loader.js:963:27)        
remote:            at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)        
remote:            at Module.load (internal/modules/cjs/loader.js:863:32)        
remote:            at Function.Module._load (internal/modules/cjs/loader.js:708:14)        
remote:            at Module.require (internal/modules/cjs/loader.js:887:19)        
remote:            at require (internal/modules/cjs/helpers.js:74:18)        
remote:            at module.exports (/tmp/build_b40717f4/.heroku/node/lib/node_modules/npm/lib/cli.js:76:23)        
remote:            at Object.<anonymous> (/tmp/build_b40717f4/.heroku/node/lib/node_modules/npm/bin/npm-cli.js:2:25)        
remote:            at Module._compile (internal/modules/cjs/loader.js:999:30)        
remote: 
remote: -----> Build failed        
remote:                
remote:        We're sorry this build is failing! You can troubleshoot common issues here:        
remote:        https://devcenter.heroku.com/articles/troubleshooting-node-deploys        
remote:                
remote:        Some possible problems:        
remote:                
remote:        - Dangerous semver range (>) in engines.node        
remote:          https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version        
remote:                
remote:        Love,        
remote:        Heroku        
remote:                
remote:  !     Push rejected, failed to compile Node.js app.        
remote: 
remote:  !     Push failed        
remote: Verifying deploy...        
remote: 
remote: !       Push rejected to ecars-pwa-aged-dawn-01.        
remote: 
To https://git.heroku.com/ecars-pwa-aged-dawn-01.git
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/ecars-pwa-aged-dawn-01.git'

exec: remote: Compressing source files... done.        
remote: Building source:        
remote: 
remote: -----> Building on the Heroku-22 stack        
remote: -----> Using buildpacks:        
remote:        1. https://github.com/lstoll/heroku-buildpack-monorepo.git        
remote:        2. heroku/nodejs        
remote: -----> Monorepo app detected        
remote:       Copied apps/ecars-pwa to root of app successfully        
remote: -----> Node.js app detected        
remote:                
remote: -----> Creating runtime environment        
remote:                
remote:        NPM_CONFIG_LOGLEVEL=error        
remote:        NODE_VERBOSE=false        
remote:        NODE_ENV=production        
remote:        NODE_MODULES_CACHE=true        
remote:                
remote: -----> Installing binaries        
remote:        engines.node (package.json):  >=10.13.0 <13.0.0        
remote:        engines.npm (package.json):   >=6.4.1        
remote:        engines.yarn (package.json):  >=1.9.4        
remote:                
remote:        Resolving node version >=10.13.0 <13.0.0...        
remote:        Downloading and installing node 12.22.12...        
remote:        Bootstrapping npm >=6.4.1 (replacing 6.14.16)...        
remote:        ERROR: npm v9.1.1 is known not to run on Node.js v12.22.12. You'll need to        
remote:        upgrade to a newer Node.js version in order to use this version of npm. This        
remote:        version of npm supports the following node versions: `^14.17.0 || ^16.13.0 ||        
remote:        >=18.0.0`. You can find the latest version at https://nodejs.org/.        
remote:                
remote:        ERROR:        
remote:        /tmp/build_b40717f4/.heroku/node/lib/node_modules/npm/lib/utils/exit-handler.js:22        
remote:          const hasLoadedNpm = npm?.config.loaded        
remote:                                   ^        
remote:                
remote:        SyntaxError: Unexpected token '.'        
remote:            at wrapSafe (internal/modules/cjs/loader.js:915:16)        
remote:            at Module._compile (internal/modules/cjs/loader.js:963:27)        
remote:            at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)        
remote:            at Module.load (internal/modules/cjs/loader.js:863:32)        
remote:            at Function.Module._load (internal/modules/cjs/loader.js:708:14)        
remote:            at Module.require (internal/modules/cjs/loader.js:887:19)        
remote:            at require (internal/modules/cjs/helpers.js:74:18)        
remote:            at module.exports (/tmp/build_b40717f4/.heroku/node/lib/node_modules/npm/lib/cli.js:76:23)        
remote:            at Object.<anonymous> (/tmp/build_b40717f4/.heroku/node/lib/node_modules/npm/bin/npm-cli.js:2:25)        
remote:            at Module._compile (internal/modules/cjs/loader.js:999:30)        
remote: 
remote: -----> Build failed        
remote:                
remote:        We're sorry this build is failing! You can troubleshoot common issues here:        
remote:        https://devcenter.heroku.com/articles/troubleshooting-node-deploys        
remote:                
remote:        Some possible problems:        
remote:                
remote:        - Dangerous semver range (>) in engines.node        
remote:          https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version        
remote:                
remote:        Love,        
remote:        Heroku        
remote:                
remote:  !     Push rejected, failed to compile Node.js app.        
remote: 
remote:  !     Push failed        
remote: Verifying deploy...        
remote: 
remote: !       Push rejected to ecars-pwa-aged-dawn-01.        
remote: 
To https://git.heroku.com/ecars-pwa-aged-dawn-01.git
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/ecars-pwa-aged-dawn-01.git'

Code of Conduct

  • I agree to follow this project's Code of Conduct

Error with 'Generating lead' and 'PDF' services

Summary

On the eCar Heroku web app , creating a new car request gives error
On the platform, pdf service gives error

Steps To Reproduce:

On various Lightning inputs ,selected the car configuration and click on 'Contact Me',
On salesforce platform try creating a pdf
It gives bad server error

Expected result

It should have created a lead in salesforce
It should have generated a pdf

Actual result

it toasts an bad server error "Your Subscription failed"
It toasts a 503 service unavailable

Additional information

Screenshot 2021-09-07 at 10 29 13

Screenshot 2021-09-07 at 10 23 23

Lead Follow Up action on Car_Configuration__c

What is missing from the application? Please describe.
During the broadcast around the 14:30 mark there was a demo of a Lead Followup Flow that was initiated from the Configuration page. I'm not seeing the action or the flow in the code base.

Describe the solution you'd like
A couple things in that flow I'm interested in - first, I'd like to see the new property editor that was released in Winter '21. And on the last page of the flow there is an option to share the PDF with customer - I'm interested in how that's done.

Describe alternatives you've considered
N/A

Additional context
broadcast

Automated Download Fail

I have followed the steps for the Automated download.
on these step "git clone [email protected]:trailheadapps/ecars.git" my console(command prompt) throws the error.

"[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists."

so I switched on the git clone https URL.
it successfully clone the repo.
now on the last step it was failed showing these error.

" if (config.fatal) throw e;
^

Error: exec: error: unknown option `show-current' ".
Please anyone, can help on these error.

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.