Cli: Unable to create new project with the '--template standard' flag

Created on 25 Feb 2019  路  12Comments  路  Source: forcedotcom/cli

Summary

The force:project:create command fails when I attempt to use the --template standard flag

Steps To Reproduce:

  1. Run the command sfdx force:project:create -n myProject --template standard

Expected result

A project is created with the new project scaffold described in the v. 45.3.1 release notes

Actual result

No project is created and the following error is returned:

'ERR_ASSERTION': Trying to copy from a source that does not exist: /Users/walkej/.local/share/sfdx/client/node_modules/force-language-services/dist/project/templates/.gitignore

Additional information

SFDX CLI Version:
sfdx-cli/6.54.4-c01dcc69db (darwin-x64) node-v8.9.4

SFDX plugin Version:
45.3.4

OS and version:
macOS 10.13.6 (17G5019)

bug tracked elsewhere

All 12 comments

@jwalke As a workaround, run touch /Users/walkej/.local/share/sfdx/client/node_modules/force-language-services/dist/project/templates/.gitignore and then re-run the command. Seems like we did not publish the .gitingnore for the project template. We'll file a bug and fix this asap.

Thanks for reporting. It looks like the .gitignore file isn't in the bundle because NPM automatically ignores those files. We will get this fixed.

This same error is happening in Windows 10, someone knows what can be done to solve it.

@hadesproject10 This actually was fixed a while ago, we forgot to close the bug. I think you are running and older version of sfdx. Please run sfdx update.

Started appearing again after updating to 7.30.12-9919bf456f
{ AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist: /Users/steals/.local/share/sfdx/client/7.30.12-9919bf456f/node_modules/salesforcedx-templates/lib/templates/project/.gitignore

Me to, command below. All went wrong after running SFDX update, which say all OK:
$ sfdx update
sfdx-cli: Updating CLI... already on latest version: 7.30.12-9919bf456f

ERROR
$ sfdx force:project:create --projectname sfdxchan
{ AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist: C:\Users\727705\AppData\Local\sfdx\client\7.30.12-9919bf456f\node_modules\salesforcedx-templates\lib\templates\project.gitignore
at EditionInterface.exports.copy (C:\Users\727705\AppData\Local\sfdx\client\7.30.12-9919bf456f\node_modules\salesforcedx-templates\node_modules\mem-fs-editor\lib\actions\copy.js:49:3)
at EditionInterface.module.exports [as copyTpl]

Fixed in sfdx-cli: Updating CLI... already on latest version: 7.30.13-9e204762d5

facing error again in 7.32
C:\Users\vkvik\Documents\SFDC Projects\sfdc>sfdx update
sfdx-cli: Updating CLI... already on latest version: 7.32.0-b30e0302f0

{ 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)

Hello
I'm facing the same issue as @vkvikashkr47 when I create a project

{ 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

This is my actual version : sfdx-cli: Updating CLI... already on latest version: 7.33.2-045d48473e

Well I had uninstalled and installing again in the default directory

I'm also facing the same issue with sfdx-cli version: 7.36.0-b1c4e9c7c8

facing the same issue over here too.

07:41:56.72 sfdx force:project:create --projectname Dev0 --outputdir c:\sfdx --template empty --manifest
{ AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist: C:\Users\David (Work)\AppData\Local\sfdx\client\7.52.0-c5ad5c3eff\node_modules\salesforcedx-templates\lib\templates\project\empty\ScratchDef.json
at EditionInterface.exports.copy (C:\Users\David (Work)\AppData\Local\sfdx\client\7.52.0-c5ad5c3eff\node_modules\salesforcedx-templates\node_modules\mem-fs-editor\lib\actions\copy.js:49:3)
at EditionInterface.module.exports [as copyTpl] (C:\Users\David (Work)\AppData\Local\sfdx\client\7.52.0-c5ad5c3eff\node_modules\salesforcedx-templates\node_modules\mem-fs-editor\lib\actions\copy-tpl.js:29:8)
at ProjectGenerator.writing (C:\Users\David (Work)\AppData\Local\sfdx\client\7.52.0-c5ad5c3eff\node_modules\salesforcedx-templates\lib\generators\projectGenerator.js:57:17)
at Object. (C:\Users\David (Work)\AppData\Local\sfdx\client\7.52.0-c5ad5c3eff\node_modules\salesforcedx-templates\node_modules\yeoman-generator\lib\index.js:438:23)
at C:\Users\David (Work)\AppData\Local\sfdx\client\7.52.0-c5ad5c3eff\node_modules\run-async\index.js:25:25
at new Promise ()
at C:\Users\David (Work)\AppData\Local\sfdx\client\7.52.0-c5ad5c3eff\node_modules\run-async\index.js:24:19
at self.env.runLoop.add.completed (C:\Users\David (Work)\AppData\Local\sfdx\client\7.52.0-c5ad5c3eff\node_modules\salesforcedx-templates\node_modules\yeoman-generator\lib\index.js:439:9)
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:\Users\David (Work)\AppData\Local\sfdx\client\7.52.0-c5ad5c3eff\node_modules\salesforcedx-templates\lib\templates\project\empty\ScratchDef.json
at EditionInterface.exports.copy (C:\Users\David (Work)\AppData\Local\sfdx\client\7.52.0-c5ad5c3eff\node_modules\salesforcedx-templates\node_modules\mem-fs-editor\lib\actions\copy.js:49:3)
at EditionInterface.module.exports [as copyTpl] (C:\Users\David (Work)\AppData\Local\sfdx\client\7.52.0-c5ad5c3eff\node_modules\salesforcedx-templates\node_modules\mem-fs-editor\lib\actions\copy-tpl.js:29:8)
at ProjectGenerator.writing (C:\Users\David (Work)\AppData\Local\sfdx\client\7.52.0-c5ad5c3eff\node_modules\salesforcedx-templates\lib\generators\projectGenerator.js:57:17)
at Object. (C:\Users\David (Work)\AppData\Local\sfdx\client\7.52.0-c5ad5c3eff\node_modules\salesforcedx-templates\node_modules\yeoman-generator\lib\index.js:438:23)
at C:\Users\David (Work)\AppData\Local\sfdx\client\7.52.0-c5ad5c3eff\node_modules\run-async\index.js:25:25
at new Promise ()
at C:\Users\David (Work)\AppData\Local\sfdx\client\7.52.0-c5ad5c3eff\node_modules\run-async\index.js:24:19
at self.env.runLoop.add.completed (C:\Users\David (Work)\AppData\Local\sfdx\client\7.52.0-c5ad5c3eff\node_modules\salesforcedx-templates\node_modules\yeoman-generator\lib\index.js:439:9)
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: '==' }
07:41:56.923 sfdx force:project:create --projectname Dev0 --outputdir c:\sfdx --template empty --manifest ended with exit code 0

Was this page helpful?
0 / 5 - 0 ratings