Comments (4)
@Deemoguse Thanks, that solved it for me!
from np.
I also see it hang, on the "Publishing package using Yarn Berry" step. I just started using np today, so it never worked for me previously. Also, I do not see the published package in npm.
np - 9.2.0
node - 20.10.0
yarn - 4.0.2
OS - macOS 14.1.1
from np.
@aoifelee, @holdenmatt I had the same problem and just now I was able to solve it. The problem was that in my package.json
file had a publish
script that was responsible for publishing the package. It was a mistake to give such a name for this script, because publish
is one of the npm hooks that is executed after the package is published to the public.
Make sure that you haven't made the same mistake.
"scripts": {
"eslint:fix": "eslint **/*.ts --fix --color",
"build:prod": "rimraf dist & cross-env rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
"build:test": "rimraf dist & cross-env MODE=test rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
"test:modules": "jest --verbose --roots test/cases/modules",
"test:integration": "jest --verbose --roots test/cases/integration",
"test:perfomance": "jest --verbose --roots test/cases/perfomance",
"test": "npm run build:test && npm run test:modules && npm run test:integration && npm run test:perfomance && rimraf dist",
- "publish": "npm run test && npm run build:prod && np --no-tests"
+ "release": "npm run test && npm run build:prod && np --no-tests"
},
from np.
For me, the np
command would hang indefinitely during the "Publishing package" step. I suspect the problem stemmed from my test
script, which was inadvertently running in watch mode while publishing. To resolve this, I modified my npm scripts:
- "test": "vitest",
+ "test": "vitest run",
+ "test:dev": "vitest",
Adjusting the test
command to vitest run
now executes the tests once and exits, thus preventing the np
command from hanging. I've added a test:dev
script that retains the original watch mode functionality for development purposes.
This adjustment may help others experiencing similar issues with np
hanging due to test scripts not terminating.
from np.
Related Issues (20)
- ls-collaborators is not a valid access command with npm v9 HOT 5
- np output command error
- np error ERR_REQUIRE_ESM HOT 2
- Provide a way to silently approve in advanced files that won't be part of the published package
- `ENOWORKSPACES` when publishing from workspace HOT 1
- np command extremely slow HOT 7
- how to hook in to publish a bundle with injected version HOT 1
- Doesn't include `dist` folder HOT 5
- Open npmjs.com instead of asking for OTP HOT 1
- after published, print the npm url HOT 2
- When prepublishOnly script fails, Git operations are not rolled back
- Support pnpm in 2024? HOT 1
- Issue with Dependency Packages on publish
- Consider dropping `ow` HOT 2
- Duplicate Tag + Release created without `v` Prefix HOT 10
- np with npm 10.5.1: Failed to parse output of npm pack HOT 6
- Husky prepare script breaking np HOT 3
- Cannot run `np` globally on Node.js v20.12.2
- Failure to Publish Specific Version since v9.0.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from np.