# Generate artifact file

**URL:** <https://hub.mender.io/t/generate-artifact-file/5729>\
**Category:** General Discussions\
**Created:** [April 3, 2023, 10:58am UTC](https://hub.mender.io/t/generate-artifact-file/5729 "2023-04-03T10:58:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr-codehunter](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mr-codehunter/32/1871_2.png) [@Mr-codehunter](https://hub.mender.io/u/Mr-codehunter)\
**Post date:** [April 3, 2023, 10:58am UTC](https://hub.mender.io/t/generate-artifact-file/5729/1 "2023-04-03T10:58:15Z")

</div>

I’m trying to generate the artifact file but the command is not working.

spider@D:~$ sudo mender-artifact write directory -n myartifact -t Debian -o myartifact.mender --directory /home/spider/myartifact --script ArtifactReboot\_Enter\_033\_index-html.sh

output 🙂

Failed to write the `rootfs-image.checksum` to the artifact: Failed to generate the checksum for the payload

Please give me the relevent solution.

---

<div class="post-metadata">

**Author:** ![mister\_kanister](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@mister\_kanister](https://hub.mender.io/u/mister_kanister)\
**Post date:** [April 3, 2023, 2:11pm UTC](https://hub.mender.io/t/generate-artifact-file/5729/2 "2023-04-03T14:11:27Z")

</div>

I’m using this command to pack a single binary in my CI/CD.

```auto
export APP_NAME=testapp # Is defined in package.json
export APP_VERSION=1.0.1 
export DEVICE_TYPE=RadxaZeroV1.51
export MENDER_ARTIFACT=$APP_NAME-$APP_VERSION.mender
export MENDER_UPDATE_MODULE=install-$APP_NAME
export MENDER_SERVER_URI="https://eu.hosted.mender.io"

mender-artifact write module-image \
        -t $DEVICE_TYPE \
        -o $CI_PROJECT_DIR/bin/$MENDER_ARTIFACT \
        -T $MENDER_UPDATE_MODULE \
        -n $APP_NAME-$APP_VERSION \
        -f $CI_PROJECT_DIR/bin/$APP_NAME

```

Later it will be pushed to the server

```auto
mender-cli artifacts upload \
        --server $MENDER_SERVER_URI \
        --token-value $MENDER_TOKEN \
        --description 'Packaged from GitLab CI/CD' \
        $CI_PROJECT_DIR/bin/$MENDER_ARTIFACT

```

With that pipeline I can push my nodejs app to my SBC and install it.

Maybe check the file permissions with `ls -lah /home/spider/myartifact`.
