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
ISSUE DESCRIPTION:
Running build script deletes all contents from package.json.
Build then immediately fails with Error while parsing JSON - Unexpected end of JSON input.
newWebpackAutoInject({silent: false,components: {AutoIncreaseVersion: true,InjectAsComment: false,InjectByTag: false},componentsOptions: {AutoIncreaseVersion: {runInWatchMode: false// it will increase version with every single build!}}})
[AIV] : info : Auto inject version started
ERROR SyntaxError: /package.json: Error while parsing JSON - Unexpected end of JSON input
SyntaxError: /package.json: Error while parsing JSON - Unexpected end of JSON input
at JSON.parse (<anonymous>)
at /node_modules/@babel/core/lib/config/files/package.js:55:20
at /node_modules/@babel/core/lib/config/files/utils.js:30:12
at Generator.next (<anonymous>)
at Function.<anonymous> (/node_modules/@babel/core/lib/gensync-utils/async.js:24:3)
at Generator.next (<anonymous>)
at evaluateSync (/node_modules/gensync/index.js:251:28)
at Function.sync (/node_modules/gensync/index.js:89:14)
at sync (/node_modules/@babel/core/lib/gensync-utils/async.js:67:25)
at sync (/node_modules/gensync/index.js:182:19)
ISSUE DESCRIPTION:
Running build script deletes all contents from package.json.
Build then immediately fails with
Error while parsing JSON - Unexpected end of JSON input
.VERSION INFO:
BUILD COMMAND:
PLUGIN CONFIGURATION:
PACKAGE.JSON CONTENTS
CONSOLE OUTPUT:
MY BEST GUESS:
It seems to be a problem in babel - this function call is only passing one argument (https://github.com/babel/babel/blob/672a58660f0b15691c44582f1f3fdcdac0fa0d2f/packages/babel-core/src/config/files/package.ts#L23) whereas it seems to want the file contents passed as the second argument according to the function definition here: https://github.com/babel/babel/blob/672a58660f0b15691c44582f1f3fdcdac0fa0d2f/packages/babel-core/src/config/files/package.ts#L36
POSSIBLE SOLUTION
Use a different method to read from/write to
package.json
.The text was updated successfully, but these errors were encountered: