You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🦋 info npm info @undataforum/components
🦋 info npm info @undataforum/tokens
🦋 info @undataforum/components is being published because our local version (0.44.0) is ahead of npm's (0.43.0)
🦋 info @undataforum/tokens is being published because our local version (0.4.1) is ahead of npm's (0.4.0)
🦋 info Publishing "@undataforum/components" at "0.44.0"
🦋 info Publishing "@undataforum/tokens" at "0.4.1"
🦋 error SyntaxError: Unexpected token > in JSON at position 1
🦋 error at JSON.parse (<anonymous>)
🦋 error at internalPublish (/home/google/Projects/undataforum/components/node_modules/@changesets/cli/dist/cli.cjs.dev.js:661:19)
🦋 error at processTicksAndRejections (internal/process/task_queues.js:93:5)
The packages are published to npm, but creating git tags fails. Line 661 in cli.cjs.dev.js is
let json = JSON.parse(stdout.toString());
I will console log stdout next time I'm publishing and amend this issue. For now I'm tagging manually.
I logged stdout.toString() and it looks like the logs of my prepublishOnly task end up in the JSON. This is what is see when I log stdout.toString() (I added the ========== separators):
Good catch! Looks like we haven't tested it with prepublish scripts in packages (we tend to have a build script we call from the root before running publish)
The file is npm-utils - I'll try and find some time to dig into what we should do when there are prepublish scripts.
Related post from the npm forums. Solution will be to try and parse the json, stripping the string before the { - I'll also likely add some better logging/error handling when we fail to parse.
Activity
maiertech commentedon Oct 18, 2019
I logged
stdout.toString()and it looks like the logs of myprepublishOnlytask end up in the JSON. This is what is see when I logstdout.toString()(I added the==========separators):Noviny commentedon Oct 19, 2019
Good catch! Looks like we haven't tested it with
prepublishscripts in packages (we tend to have a build script we call from the root before running publish)The file is npm-utils - I'll try and find some time to dig into what we should do when there are prepublish scripts.
Noviny commentedon Oct 19, 2019
Related post from the npm forums. Solution will be to try and parse the json, stripping the string before the
{- I'll also likely add some better logging/error handling when we fail to parse.Noviny commentedon Oct 19, 2019
Should be fixed in
2.1.2- let me know if you're still have struggles.maiertech commentedon Oct 21, 2019
Awesome, works like a charm! Thanks for the fixing this so quickly, @Noviny.