# Compiler Warning ASPIREJAVASCRIPT001

<Badge
  text="Version introduced: 13.3"
  variant="note"
  size="large"
  class:list={'mb-1'}
/>

> JavaScript hosting APIs are for evaluation purposes only and are subject to change or removal in future updates. Suppress this diagnostic to proceed.

This diagnostic warning is reported when using experimental JavaScript hosting and publishing APIs in Aspire, including:

- `PublishAsStaticWebsite<TResource>`
- `PublishAsNodeServer<TResource>`
- `PublishAsNpmScript<TResource>`
- `AddNextJsApp`
- `DisableBuildValidation`

These APIs enable you to configure how JavaScript applications (Vite, Node.js, Next.js) are published and deployed via Aspire's pipeline infrastructure.

## Example

The following code generates `ASPIREJAVASCRIPT001`:

```csharp title="C# — AppHost.cs"
var builder = DistributedApplication.CreateBuilder(args);

var frontend = builder.AddViteApp("frontend", "../MyViteApp")
    .PublishAsStaticWebsite();
```

## To correct this warning

Suppress the warning with either of the following methods:

- Set the severity of the rule in the _.editorconfig_ file.

  ```ini title=".editorconfig"
  [*.{cs,vb}]
  dotnet_diagnostic.ASPIREJAVASCRIPT001.severity = none
  ```

  For more information about editor config files, see [Configuration files for code analysis rules](/diagnostics/overview/#suppress-in-the-editorconfig-file).

- Add the following `PropertyGroup` to your project file:

  ```xml title="C# project file"
  <PropertyGroup>
      <NoWarn>$(NoWarn);ASPIREJAVASCRIPT001</NoWarn>
  </PropertyGroup>
  ```

- Suppress in code with the `#pragma warning disable ASPIREJAVASCRIPT001` directive.

## See also

- [Deploy JavaScript apps](/deployment/javascript-apps/) - Learn about deploying JavaScript applications with Aspire