Issue 1:
Is there an existing issue for this?

I have searched the existing issues

This issue exists in the latest npm version

I am using the latest npm

Current Behavior

logs are updating rapidly when used inside another run-script (i think)

Expected Behavior

logs/progress should not display when interfering with other output

Steps To Reproduce

No response

Environment

No response

Issue 2:
Is there an existing issue for this?

I have searched the existing issues

This issue exists in the latest npm version

I am using the latest npm

Current Behavior

While running npm scripts, npm logs timing config:load:flatten completed in 1/2ms (The 1/2ms isnt what it actually logs, rather it flickers between 1ms and 2ms).

This only happens when I have a .npmrc file in the package root. npm also says npm WARN ignoring workspace config at /home/thomas/Documents/octobox/create-octobox-app/.npmrc before starting my script.

While this does not prevent me from typing (as far as I can tell), I can't see my input nor is it really ideal for my terminal to do this. I also noticed a significant slowdown installing packages (part of my script has to run npm i -D "a bunch of packages"), although this could be a coincidence.

Example:

npm WARN ignoring workspace config at /home/thomas/Documents/octobox/create-octobox-app/.npmrc

> create-octobox-app@2.0.0 test
> npm run elevate && npm run build && npm run install && node test/main.test.js && npm run clean

npm WARN ignoring workspace config at /home/thomas/Documents/octobox/create-octobox-app/.npmrc

> create-octobox-app@2.0.0 elevate
> sudo echo '' || exit 0

[sudo] password for thomas: (⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠙ : timing config:load:flatten (⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠙ : timing config:load:flatten Completed in 2ms
(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠙ : timing config:load:flatten Completed in 1ms
npm WARN ignoring workspace config at /home/thomas/Documents/octobox/create-octobox-app/.npmrc

> create-octobox-app@2.0.0 build
> tsc --project tsconfig.json && minify bin/index.max.js > bin/index.js && rimraf bin/index.max.js && chmod u+x bin/index.js || exit 0

npm WARN ignoring workspace config at /home/thomas/Documents/octobox/create-octobox-app/.npmrc

> create-octobox-app@2.0.0 install
> npm run clean && sudo npm link || npm link

npm WARN ignoring workspace config at /home/thomas/Documents/octobox/create-octobox-app/.npmrc

> create-octobox-app@2.0.0 clean
> sudo npm -g uninstall create-octobox-app || npm -g uninstall create-octobox-app

up to date, audited 1 package in 147ms

found 0 vulnerabilities
npm WARN ignoring workspace config at /home/thomas/Documents/octobox/create-octobox-app/.npmrc

added 1 package, and audited 3 packages in 497ms

found 0 vulnerabilities
➤ Running tests...⠂) ⠙ : timing config:load:flatten Completed in 2ms
➤ Running test 1...) ⠙ : timing config:load:flatten Completed in 2ms

Expected Behavior

For this to not happen.

Same example as above, but what it should look like:

> create-octobox-app@2.0.0 test
> npm run elevate && npm run build && npm run install && node test/main.test.js && npm run clean

> create-octobox-app@2.0.0 elevate
> sudo echo '' || exit 0

[sudo] password for thomas:

> create-octobox-app@2.0.0 build
> tsc --project tsconfig.json && minify bin/index.max.js > bin/index.js && rimraf bin/index.max.js && chmod u+x bin/index.js || exit 0

> create-octobox-app@2.0.0 install
> npm run clean && sudo npm link || npm link

> create-octobox-app@2.0.0 clean
> sudo npm -g uninstall create-octobox-app || npm -g uninstall create-octobox-app

removed 1 package, and audited 1 package in 157ms

found 0 vulnerabilities

added 1 package, and audited 3 packages in 349ms

found 0 vulnerabilities
➤ Running tests...
➤ Running test 1...

Steps To Reproduce

Have a .npmrc file in some package installed locally with npm link. Mine had one line with engine-strict=true in it.

Run any of said package's npm scripts, anywhere on the system. For when I'm out of the package's root directory, I've used npm create octobox-app, because I have a binary to execute with npx in my package and the name is create-octobox-app. I haven't tested running a script without using npx or some sort of alias like npm create outside of the root directory, though.

See the error.

Environment

npm: 8.5.5

Node.js: 16.14.0

OS Name: Ubuntu 21.09

System Model Name: Custom build (will provide specs if requested)

npm config:

; "user" config from /home/thomas/.npmrc

//registry.npmjs.org/:_authToken = (protected)
unsafe-perm = true
user = "0"

; node bin location = /usr/local/bin/node
; cwd = /home/thomas/Documents/octobox/create-octobox-app
; HOME = /home/thomas
; Run `npm config ls -l` to show all defaults.