When I execute the command np
and choose prerelease
I receive the following error message:
Unexpected token u in JSON at position 0
This happens when I have already created a prerelease and I'm trying to update it.
The first time I published the prerelease (v5.0.0-0
) it worked as expected.
{
"version": "5.0.0-0",
"engines": {
"node": ">=14 <15",
"npm": ">=6 <7"
},
...
"files": [
"lib",
"dist"
],
"scripts": {
"start": "rimraf .tmp/* && BABEL_ENV=development webpack-dev-server --config webpack.dev.config.js",
"eslint": "eslint src/ --ext .js --ext .jsx",
"eslint:fix": "eslint src/ --ext .js --ext .jsx --fix",
"build:lib": "rimraf lib/* && BABEL_ENV=production babel src --out-dir lib",
"build:dist": "rimraf dist/* && BABEL_ENV=production webpack --config webpack.prod.config.js",
"prebuild": "npm run eslint",
"build": "npm run build:lib && npm run build:dist",
"deploy": "npm run build && np",
"test": ""
},
"peerDependencies": {
...
},
"dependencies": {
...
},
"devDependencies": {
...
}
}
npm run deploy -- --any-branch
prerelease
(in my case 5.0.0-1
)Unexpected token u in JSON at position 0
A new prerelease is created, with tag v5.0.0-1
Run npx np prerelease --any-branch --tag=beta
np - 7.6.0
Node.js - 14.18.1
npm - 6.14.15
Git - 2.30.1
OS - macOS 11.5.1
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too