ionic-team / ionic-team/capacitor-docs

npm now requires users to approve builds, affecting cap's getting-started instructions

Open
#551 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
MDX
Stars
48
Forks
792
Avg merge
2d 7h
Merged PRs (30d)
4

Description

https://capacitorjs.com/docs/getting-started

npm ( as of npm 11.16.0 ) has been updated to now require manual post-install script approval, requiring additional steps when creating a capacitor project ( much like many other projects ) due to post install scrips from the esbuild and fsevents modules. It might be useful to make a not of this change in this page, eg

> Note: as of npm version 11.16.0, some npm packages will require manual approval to run post-install scripts.

For reference, the entire process now looks like this:

```bash
➜ tmp npm init @capacitor/app@latest

> npx
> "create-capacitor-app"

✔ What is the name of your app?
… foo
✔ What directory should be used for your app?
… foo
✔ What should be the App ID for your app?

App IDs (aka Bundle ID in iOS and Application ID in Android) are unique
identifiers for apps. They must be in reverse domain name notation, generally
representing a domain name that you or your company owns.

… com.foo.online

🎉 Your Capacitor app is ready to go! 🎉

Next steps:
- cd foo/
- install dependencies (e.g. w/ npm install)
- npm start
➜ tmp cd foo
➜ foo npm install

added 106 packages, and audited 107 packages in 6s

16 packages are looking for funding
run `npm fund` for details

found 0 vulnerabilities
npm warn allow-scripts 1 package has install scripts not yet covered by allowScripts:
npm warn allow-scripts esbuild@0.27.7 (postinstall: node install.js)
npm warn allow-scripts
npm warn allow-scripts Run `npm approve-scripts --allow-scripts-pending` to review, or `npm approve-scripts ` to allow.
➜ foo npm approve-scripts esbuild
Approved esbuild:
added esbuild@0.27.7
➜ foo npm i @capacitor/android @capacitor/ios

added 3 packages, and audited 110 packages in 1s

16 packages are looking for funding
run `npm fund` for details

found 0 vulnerabilities
npm warn allow-scripts 1 package has install scripts not yet covered by allowScripts:
npm warn allow-scripts fsevents@2.3.3 (install: (install scripts present))
npm warn allow-scripts
npm warn allow-scripts Run `npm approve-scripts --allow-scripts-pending` to review, or `npm approve-scripts ` to allow.
➜ foo npm approve-scripts fsevents
Approved fsevents:
added fsevents@2.3.3
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.