Don't reflect environment variable for npm

i’m now create blog by hexo on netlify.
a hexo plugin uses fsevents and occured build error

10:21:34 AM: ERR! notsup Unsupported platform for fsevents@2.1.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})

so i want to do on the container 'npm install --no-optional.
so i set Environment variables ‘NPM_FLAGS / --no-optional’
but at log say below,

10:21:31 AM: Installing NPM modules using NPM version 6.13.4
10:21:34 AM: npm
10:21:34 AM: ERR! code EBADPLATFORM
10:21:34 AM: npm

how to set flags to npm?

I don’t think we’ll “mention” the npm flags we use; that environment variable should be right but ONLY in case it’s US automatically running npm install (so your build command is npm run build or something rather than explicitly containing npm install) If your build command is instead something cd src && npm install then you should put the flags in there: cd src && npm --no-optional install

My first question, though, would be “Are you sure fsevents isn’t listed as required?”