CARVIEW |
Select Language
HTTP/2 200
date: Fri, 25 Jul 2025 21:57:13 GMT
content-type: text/html; charset=utf-8
cache-control: max-age=0, private, must-revalidate
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
link: ; rel=preload; as=fetch; crossorigin=use-credentials
referrer-policy: no-referrer-when-downgrade
server-timing: issue_layout-fragment;desc="issue_layout fragment";dur=243.94107,issue_conversation_content-fragment;desc="issue_conversation_content fragment";dur=353.384514,issue_conversation_sidebar-fragment;desc="issue_conversation_sidebar fragment";dur=86.725227,nginx;desc="NGINX";dur=1.191701,glb;desc="GLB";dur=101.67666
strict-transport-security: max-age=31536000; includeSubdomains; preload
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With, Accept,Accept-Encoding, Accept, X-Requested-With
x-content-type-options: nosniff
x-frame-options: deny
x-voltron-version: a2eb102
x-xss-protection: 0
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=3wy8k%2BUrWJRVPnMAmH93VsoHgkEBgKs5%2BaNkDdKDFbl3eEzJxmxOQHKuTdEKhJ7VSyztz%2BAeJBn0D3HRQdkE86BnnZ7xuhxX7JuRLGWa6zu965ZAN9%2BL1dz2MGbtuDNMLXMVq8id7o5zA4w8LqGhUVLu5p%2BHpGKVCL0F9lHQ3pFXz9EbmrfMyK3xrMlACPUqEoHI3JRPFf5xQz0kGiTtf0%2BFaVAoH2RZ%2FGsz4aOJxuKNy0sYn8rs9rtc7JokD%2FtCn1OpUQMQsJHZxMrFdgmalg%3D%3D--Lk%2FWgcvG1On88P%2B8--3seHNCiIKEs9f1PrJJ6hbQ%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1250893658.1753480633; Path=/; Domain=github.com; Expires=Sat, 25 Jul 2026 21:57:13 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sat, 25 Jul 2026 21:57:13 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: BED0:17C58D:103CB1:168DD0:6883FDB9
postinstall "cannot run in wd" should throw error, not warning Β· Issue #18060 Β· npm/npm Β· GitHub
No one assignedNo labelsNo typeNo projectsNo milestoneNone yetNo branches or pull requests
Skip to content
Navigation Menu
{{ message }}
This repository was archived by the owner on Aug 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3k
This repository was archived by the owner on Aug 11, 2022. It is now read-only.
postinstall "cannot run in wd" should throw error, not warningΒ #18060
Copy link
Copy link
Open
Description
I'm opening this issue because:
- npm is crashing.
- npm is producing an incorrect install.
- npm is doing something I don't understand.
- Other (see below for feature requests):
What's going wrong?
I have a postinstall step that runs bower install
, which is necessary for my build to succeed in CI. However, CircleCI v2 runs containers as root, and the following warning gets thrown:
cannot run in wd %s %s (wd=%s) undefined bower install /root/project
In short, it seems as if npm is trying to drop to an unprivileged user and failing (I'm pretty sure this is separate from the fact bower will fail if run as a root user without the --allow-root
flag).
All of this is fine and understandable (supplying --unsafe-perm
to npm and --allow-root
to bower fixes my issue), but npm should probably throw an error (instead of a warning) in the event of this happening so builds fail earlier.
How can the CLI team reproduce the problem?
There's no npm-debug.log file generated in this case.
- Create a package.json with bower as a dependency and
bower install
as apostinstall
script. - Run
npm install
as root.
supporting information:
npm -v
prints: 5.3.0node -v
prints: v8.2.1npm config get registry
prints:
npm info it worked if it ends with ok
npm info using npm@5.3.0
npm info using node@v8.2.1
https://registry.npmjs.org/
npm info ok
- Windows, OS X/macOS, or Linux?: Linux
- Network issues:
- Geographic location where npm was run: London, UK
- I use a proxy to connect to the npm registry.
- I use a proxy to connect to the web.
- I use a proxy when downloading Git repos.
- I access the npm registry via a VPN
- I don't use a proxy, but have limited or unreliable internet access.
- Container:
- I develop using Vagrant on Windows.
- I develop using Vagrant on OS X or Linux.
- I develop / deploy using Docker.
- I deploy to a PaaS (Triton, Heroku).
callumlocke, aliatsis, takayukioda, joaofragaptc, calzoneman and 1 more
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Milestone
Relationships
Development
Issue actions
You canβt perform that action at this time.