I am building a PWA and following this tutorial to create a TWA. npm i -g @bubblewrap/cli runs fine. When I run
bubblewrap init --manifest=http://localhost:8000/static/manifest.webmanifest
or
bubblewrap init --manifest="http://localhost:8000/static/manifest.webmanifest"
or
bubblewrap init --manifest="<http://localhost:8000/static/manifest.webmanifest>"
I get this error:
-bash: bubblewrap: command not found
I have updated npm and bubblewrap based on this post and am still getting the error. My index.html is inside the static directory.
- node v17.6.0
- npm v8.5.1
- java v17
- jdk v11
Does anyone have advice on why bubblewrap isn't being recognized?
I had the same problem. in my case the issue was that when i installed the bubblewrap with npm, it installed it in the v18.12.1 location, but my npm was using another version (in this case v16.16.0). so using the
bubblewrapcommand resulted in the same error as you mentioned. I stumbled upon this question that solved my problem: NVM: npm install -g keeps using wrong version of nodeSo basically on Ubuntu
npminstall packages globally usingprefixvariable that is set in a file called~/.npmrc. I fixed it with editing~/.npmrcfile, and made sure thatprefixpoints to the correct version.