The message warns about **\.* even though that isn't present in the forceignore file.

    (node:436) Warning: The .forceignore file doesn't adhere to .gitignore format which will be the default behavior starting in Spring '21 release. More information on .gitignore format here: https://git-scm.com/docs/gitignore. Fix the following lines in your .forceignore and add '# .forceignore v2' to your .forceignore file to switch to the new behavior.
    (node:436) Warning:     **\.*
    ERROR running force:source:deploy:  Unexpected file found in package directory: C:\something\something\something\something\something\main\default\lwc\jsconfig.json

The only relevant lines are the following, which look valid according to the docs linked, and worked in v1.


I am thinking that to workaround this instance I am just going to hardcode the full path to the problem file and remove the wildcard version.

From @Christian Szandor Knapp's reported issue, it sounds like the problems are worse on salesforcedx >=50 and that rolling back to [email protected] is helping. It also sounds like these bugs are being worked on. Hopefully they can be fixed soon.

My installed version is:

> sfdx --version
sfdx-cli/7.75.1-5585088c75 win32-x64 node-v12.18.3

> sfdx plugins --core
@oclif/plugin-autocomplete 0.1.5 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.9.0 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/lwc-dev-server 2.5.1
├─ @oclif/plugin-help 2.2.3
└─ @oclif/plugin-update 1.3.9
@salesforce/sfdx-trust 3.4.3 (core)
alias 1.1.2 (core)
analytics 1.12.1 (core)
config 1.1.8 (core)
generator 1.1.3 (core)
salesforcedx 49.13.1 (core)
├─ custom-metadata 1.0.10 (core)
├─ templates 49.9.1 (core)
├─ salesforce-alm 49.12.2 (core)
├─ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
└─ apex 0.1.1 (core)
sfdx-cli 7.75.1 (core)
  • Did you add the v2 comment to use v2?
    – sfdcfox
    Oct 20, 2020 at 15:15
  • Yes. I added that # .forceignore v2 comment. Before adding it was just a warning. After it was the same warning plus the error about the specific file.
    – Dan Puza
    Oct 20, 2020 at 15:22
  • 1
    Am seeing the same with with the following file: ` # .forceignore v2 package.xml # LWC configuration files /jsconfig.json **/.eslintrc.json # LWC Jest **/__mocks__/ /__tests__/ ` running sfdx 50.1.1, sfdx-cli 7.76.1
    – Arlene
    Oct 20, 2020 at 15:37
  • 3
    I've created an issue: github.com/forcedotcom/cli/issues/690 Oct 21, 2020 at 15:35
  • 2
    Some background that might be useful, there is a default rule being appended to the .forceignore contents for **/.*. This gets converted into **\.* on Windows as shown in the message. The warning is shown because the old and new libraries used for .gitignore handling don't agree on how to interpret this for .eslintrc.json. Looking at the doc for new method (npmjs.com/package/ignore) I suspect it really needed to be **\\.* to work. I got the problem on Win7 using just force:project:create without any changes. Oct 21, 2020 at 22:11

4 Answers 4


An update to salesforcedx latest-rc made today should hopefully fix these issues. This will become the default core version shipped with the CLI release planned for this Thursday. You can try the fixes made in the latest-rc by: sfdx plugins:install salesforcedx@latest-rc


I no longer get the error or warning on salesforcedx 50.3.1.

  • The salesforcedx plugin is deprecated. Installing it manually via sfdx plugins:install salesforcedx is no longer supported and can result in duplicate commands and outdated plugins. Link Aug 30, 2021 at 15:32

After re-reading the docs, I changed it to this and no longer get the error. But still get the warning.

  • But this only fixes the classes and others will not retrieved for me
    – Ruwantha
    Oct 25, 2020 at 5:38




The above are the valid formats and I'm not seeing any error or warning with the above configuration. However the below format will throw the warning


Which needs to be changed to


Add it .forceignore v2 as 1st line of .forceignore file.

  • 4
    Get the same warning with # .forceignore v2 as the first line of the .forceignore file.
    – Dan Puza
    Oct 21, 2020 at 14:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .