kontent-ai / kontent-ai/kickstart-react-app

Cannot import Kickstart without webspotlight exclusion

Open
#19 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

### Brief bug description

npm run model:import --filename="scripts/backups/kickstart-base-new.zip" fails in newly generated projects due to the removal of Web Spotlight from the product.

Error:
```
...
pathname: '/v2/projects/efd35e99-0f03-00ea-7ec1-527eec298474/web-spotlight/status',
...
data: {
request_id: '9af40f76e88baf83',
error_code: 16,
message: 'You do not have sufficient permissions to perform requested action.'
}
},
status: 403
```

### Repro steps

1. Generate a new Kickstart project
2. Clone the repo
3. Run the model:import command per the Learn documentation
4. See error

### Expected behavior

Import cmd imports content model and sample items.

### Additional context

Adding an exclusion to the import scripts allows the clean and import to run successfully.

```
await cleanEnvironment({
environmentId,
apiKey: mapiKey,
exclude: ["previewUrls", "webSpotlight"]
});

await restoreEnvironment({
environmentId,
apiKey: mapiKey,
fileName: process.env.npm_config_filename,
exclude: ["previewUrls", "webSpotlight"]
});
```

This change will need to be propagated to both Business and Technical Kickstart experiences.

Contributor guide

Open the contributing guide

Research direction

Start with the import scripts invoked by `npm run model:import` and inspect the `cleanEnvironment` and `restoreEnvironment` calls shown in the issue. Reproduce the failure with the documented command, then verify the import succeeds for both Business and Technical Kickstart experiences without the Web Spotlight permission error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.