Expand Minimize

Component entry point in a bundle must point to a valid project file

Component entry point in a bundle must point to a valid project file

CheckId SPF010402
TypeName BundleEntryEntryPointsToValidProjectFile
Severity Error
Type BundleEntry

Bundle must specify a valid entry point for each of its components using the entrypoint (or entry in the previous versions of the SharePoint Framework) property. The specified path must point to either a valid project file or to an intermediate file in the lib folder.

config.json example (manifest schema v2.0)

{
  "$schema": "https://dev.office.com/json-schemas/spfx-build/config.2.0.schema.json",
  "version": "2.0",
  "bundles": {
    "weather-web-part": {
      "components": [
        {
          "entrypoint": "./lib/webparts/weather/WeatherWebPart.js",
          "manifest": "./src/webparts/weather/WeatherWebPart.manifest.json"
        }
      ]
    }
  },
  "externals": {
    "jquery": {
      "path": "https://code.jquery.com/jquery-2.1.1.min.js",
      "globalName": "jQuery"
    },
    "simpleWeather": {
      "path": "https://cdnjs.cloudflare.com/ajax/libs/jquery.simpleWeather/3.1.0/jquery.simpleWeather.min.js",
      "globalName": "jQuery",
      "globalDependencies": ["jquery"]
    }
  },
  "localizedResources": {
    "WeatherWebPartStrings": "lib/webparts/weather/loc/{locale}.js"
  }
}


config.json example (manifest schema v1)
{
  "entries": [
    {
      "entry": "./lib/webparts/weather/WeatherWebPart.js",
      "manifest": "./src/webparts/weather/WeatherWebPart.manifest.json",
      "outputPath": "./dist/weather.bundle.js"
    }
  ],
  "externals": {
    "jquery": {
      "path": "https://code.jquery.com/jquery-2.1.1.min.js",
      "globalName": "jQuery"
    },
    "simpleWeather": {
      "path": "https://cdnjs.cloudflare.com/ajax/libs/jquery.simpleWeather/3.1.0/jquery.simpleWeather.min.js",
      "globalName": "jQuery",
      "globalDependencies": ["jquery"]
    }
  },
  "localizedResources": {
    "mystrings": "webparts/weather/loc/{locale}.js"
  }
}

Disclaimer: The views and opinions expressed in this documentation and in SPCAF do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. SPCAF and RENCORE are registered trademarks of Rencore. All other trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners.