3

When I try to create project with manifest it is giving me this error:

 Starting SFDX: Create Project

12:39:56.757 sfdx force:project:create --projectname Dev --outputdir c:\ --template standard --manifest
{ AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist: C:\Program Files (x86)\Salesforce CLI\client\node_modules\salesforcedx-templates\lib\templates\project\standard\ScratchDef.json
    at EditionInterface.exports.copy (C:\Program Files (x86)\Salesforce CLI\client\node_modules\salesforcedx-templates\node_modules\mem-fs-editor\lib\actions\copy.js:49:3)
    at EditionInterface.module.exports [as copyTpl] (C:\Program Files (x86)\Salesforce CLI\client\node_modules\salesforcedx-templates\node_modules\mem-fs-editor\lib\actions\copy-tpl.js:29:8)
    at ProjectGenerator.writing (C:\Program Files (x86)\Salesforce CLI\client\node_modules\salesforcedx-templates\lib\generators\projectGenerator.js:57:17)
    at Object.<anonymous> (C:\Program Files (x86)\Salesforce CLI\client\node_modules\salesforcedx-templates\node_modules\yeoman-generator\lib\index.js:427:27)
    at C:\Program Files (x86)\Salesforce CLI\client\node_modules\run-async\index.js:25:25
    at new Promise (<anonymous>)
    at C:\Program Files (x86)\Salesforce CLI\client\node_modules\run-async\index.js:24:19
    at self.env.runLoop.add.completed (C:\Program Files (x86)\Salesforce CLI\client\node_modules\salesforcedx-templates\node_modules\yeoman-generator\lib\index.js:428:13)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
  generatedMessage: false,
  name: 'AssertionError [ERR_ASSERTION]',
  code: 'ERR_ASSERTION',
  actual: false,
  expected: true,
  operator: '==' }
{ AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist: C:\Program Files (x86)\Salesforce CLI\client\node_modules\salesforcedx-templates\lib\templates\project\standard\ScratchDef.json
    at EditionInterface.exports.copy (C:\Program Files (x86)\Salesforce CLI\client\node_modules\salesforcedx-templates\node_modules\mem-fs-editor\lib\actions\copy.js:49:3)
    at EditionInterface.module.exports [as copyTpl] (C:\Program Files (x86)\Salesforce CLI\client\node_modules\salesforcedx-templates\node_modules\mem-fs-editor\lib\actions\copy-tpl.js:29:8)
    at ProjectGenerator.writing (C:\Program Files (x86)\Salesforce CLI\client\node_modules\salesforcedx-templates\lib\generators\projectGenerator.js:57:17)
    at Object.<anonymous> (C:\Program Files (x86)\Salesforce CLI\client\node_modules\salesforcedx-templates\node_modules\yeoman-generator\lib\index.js:427:27)
    at C:\Program Files (x86)\Salesforce CLI\client\node_modules\run-async\index.js:25:25
    at new Promise (<anonymous>)
    at C:\Program Files (x86)\Salesforce CLI\client\node_modules\run-async\index.js:24:19
    at self.env.runLoop.add.completed (C:\Program Files (x86)\Salesforce CLI\client\node_modules\salesforcedx-templates\node_modules\yeoman-generator\lib\index.js:428:13)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
  generatedMessage: false,
  name: 'AssertionError [ERR_ASSERTION]',
  code: 'ERR_ASSERTION',
  actual: false,
  expected: true,
  operator: '==' }
12:40:03.206 sfdx force:project:create --projectname Dev --outputdir c:\ --template standard --manifest
 ended with exit code 0

Can you please let me know what I am missing:

I have:

  1. installed vs code, salesforce extension pack, salesforce cli, set the environment variable for my user, there is jdk installed (I have not set the path for it, not sure if it is required?)

What I am missing?

Thanks in Advance!!

3

Have you tried the approaches mentioned in https://success.salesforce.com/answers?id=9063A000000pwoMQAQ i.e.,

  • Installing the x64 version of the CLI and changing the PATH environment variable to point to that
  • Rename and move "Salesforce CLI" folder to a path without space in its name
  • Open visual studio code as an administrator
  • Ensuring you have installed the appropriate version of CLI i.e., x64 CLI or x86 that your machine would support
| improve this answer | |
  • In the link you shared: It says to update cli by using this command in cmd: sfdx update » Warning: Attempting to contact update site... sfdx-cli: Updating CLI... ! » Error: S3 host is not reachable. I am geeting this error when run sfdx update command in cmd. – Krishna Bidwai Jun 10 at 13:38
  • Do you have any proxy set up? Does this help salesforce.stackexchange.com/questions/225450/… – Swetha Jun 10 at 13:41
  • It is set to automatic, Not sure what need to changed or this is the root cause. – Krishna Bidwai Jun 10 at 15:38
  • @KrishnaBidwai Have you been able to fix the error? – Swetha Jun 17 at 8:27
  • no shwetha, having tough time from two weeks on that – Krishna Bidwai Jun 18 at 14:01
1

I solved this issue by following three steps:

  1. Install the x64 version of CLI.
  2. Rename the Salesforce CLI directory to SalesforceCLI( white space removed) and update the environment variable to reflect the directory name changes.
  3. Update sfdx. ( That's correct, you might have installed the latest version but still, sfdx update fixed it for me) sfdx update sfdx-cli: Updating CLI from 7.68.0-6ad8607878 to 7.68.6-d37008df83... done
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.