node.jsmacospermissionsfile-permissionsmacos-mojave

What am I doing wrong with '--allow-fs-read=*'? Getting 'zsh: no matches found' error on Mac using Node.js Permission Model


I am experimenting with the new Nodejs permission model on MacOS Venture 13.3.1. I have got Node.js v20.1.0 installed, and whenever I enter the following command:

node --experimental-permission --allow-fs-read=* index.js

I get the following error in the terminal:

zsh: no matches found: --allow-fs-read=*

I don't know what is wrong with "--allow-fs-read=*". It looks fine to me.


Solution

  • I have managed to solve it. To get it to work, I escaped the wildcard(*) with a backslash( \ ):

    node --experimental-permission --allow-fs-read=\* index.js