How can I use .npmrc when building node app

I have a node app and all of its dependencies live in a private npm repo. The .npmrc is present in the app folder but when I run
snapcraft --destructive-mode
it ignores the .npmrc and tries to download packages from the https://registry.npmjs.org. This is my folder structure:

parentFolder
— snapcraft.yaml
— nodeApp
--------- package.json
--------- .npmrc
--------- rest of the files and folders

and this is the contents of my snapcraft.yaml

`name: mydaemon
version: git
summary: first try
description: |
a background daemon

confinement: devmode
base: core20

parts:
daemon:
plugin: npm
npm-node-version: 12.19.1
source: nodeApp
apps:
daemon:
command: $SNAP/bin/node $SNAP/dist/daemon`