# NPM Package Migration Guide

## Content

Beginning with **version 19**, all SpreadJS libraries will be published under the new **[@mescius](https://www.npmjs.com/package/@mescius/spread-sheets "https://www.npmjs.com/package/@mescius/spread-sheets")** NPM scope.
The legacy scope **[@grapecity](https://www.npmjs.com/package/@grapecity/spread-sheets "https://www.npmjs.com/package/@grapecity/spread-sheets")** will no longer receive updates or maintenance.

>type=note
> **Note**: All @grapecity packages will remain available on NPM for legacy projects but will not be updated or supported after version 18.2.5

**Action required:**
To receive the latest features, fixes, and technical support, please migrate your project dependencies from `@grapecity` to `@mescius`.

***

## **1\. Migration Steps**

Follow the steps below to update your project safely:

### **Step 1. Open Your Project**

1. Launch your project folder in your preferred code editor (e.g., **VS Code**).
2. Make sure you have a backup or recent commit before proceeding.

### **Step 2. Update Namespace References**

You need to change all occurrences of `@grapecity/` to `@mescius/`.
There are two main areas to check:

* **Dependencies in** `package.json`
* **Import statements in your source code**

#### Use Find and Replace in Your Editor

1. Open the **Find and Replace** tool in your editor (e.g., press `Ctrl + Shift + F` in VS Code).
2. In the **Find** field, enter:

```auto
@grapecity/
```

4. In the **Replace** field, enter:

```auto
@mescius/
```

5. Click **Replace All** (or review each change manually if preferred).
6. Save all modified files.

### **Step 3. Update Dependencies**

1. Open your terminal and run:

```auto
npm install
```

or if using yarn:

```auto
yarn install
```

2. This will download and install all packages from the new `@mescius` scope.

### **Step 4. Verify the Migration**

1. Check that your `package.json` dependencies now look like this:

```auto
{
  "dependencies": {
    "@mescius/spread-sheets": "^19.0.0"
  }
}
```

2. Review your code for import statements such as:

```auto
import * as GC from "@mescius/spread-sheets";
```

3. Run your application and ensure all SpreadJS functionalities work as expected.

### **Step 5. Clean Up (Optional)**

After successful migration, you can remove cached data or old packages:

```auto
npm prune
npm cache clean --force
```

## **2\. Common Issues & Troubleshooting**

| Issue | Possible Cause | Solution |
| ----- | -------------- | -------- |
| Build fails with missing module error | `@grapecity` import still exists | Search for any remaining `@grapecity/` references and replace them |
| Version conflict | Using mismatched versions | Ensure all `@mescius/spread-*` packages use the **same major version** |
| TypeScript type errors | Mixing old and new namespaces | Delete `node_modules` and reinstall using fresh dependencies |

## **3\. Support**

If you encounter any issues during migration, please contact **Mescius Technical Support** or visit our documentation portal for additional resources.

***

**Thank you for migrating to the new** `@mescius` **namespace!**
This update ensures you continue receiving the latest improvements, security updates, and active maintenance for the SpreadJS product family.