Ivy compiled node module not able to upload to nexus

Hello , I have a node-angular project which is compiled from ivy complier and i want to upload it to my self hosted nexus repository. I have done the prequisite for setting up the repository and user. When i build the code and try to upload the tgz to nexus it throws an error

npm publish

> authwidget@1.2.9 prepublishOnly .
> node --eval "console.error('ERROR: Trying to publish a package that has been compiled by Ivy. This is not allowed.\nPlease delete and rebuild the package, without compiling with Ivy, before attempting to publish.\n')" && exit 1

ERROR: Trying to publish a package that has been compiled by Ivy. This is not allowed.
Please delete and rebuild the package, without compiling with Ivy, before attempting to publish.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! authwidget@1.2.9 prepublishOnly: `node --eval "console.error('ERROR: Trying to publish a package that has been compiled by Ivy. This is not allowed.\nPlease delete and rebuild the package, without compiling with Ivy, before attempting to publish.\n')" && exit 1`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the authwidget@1.2.9 prepublishOnly script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/shubhamsingh/.npm/_logs/2024-03-11T09_48_39_761Z-debug.log```


0 info it worked if it ends with ok

1 verbose cli [

1 verbose cli ‘/Users/shubhamsingh/.nvm/versions/node/v14.15.0/bin/node’,

1 verbose cli ‘/Users/shubhamsingh/.nvm/versions/node/v14.15.0/bin/npm’,

1 verbose cli ‘publish’

1 verbose cli ]

2 info using npm@6.14.8

3 info using node@v14.15.0

4 verbose npm-session c1ab6d44ccc0d5e6

5 verbose publish [ ‘.’ ]

6 info lifecycle authwidget@1.2.9~prepublish: authwidget@1.2.9

7 info lifecycle authwidget@1.2.9~prepare: authwidget@1.2.9

8 info lifecycle authwidget@1.2.9~prepublishOnly: authwidget@1.2.9

9 verbose lifecycle authwidget@1.2.9~prepublishOnly: unsafe-perm in lifecycle true

10 verbose lifecycle authwidget@1.2.9~prepublishOnly: PATH: /Users/shubhamsingh/.nvm/versions/node/v14.15.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/shubhamsingh/Documents/ui-common-lib/bitoauthwidget/dist/authwidget/node_modules/.bin:/opt/homebrew/opt/node@14/bin:/Users/shubhamsingh/.nvm/versions/node/v14.15.0/bin:/opt/homebrew/opt/node@16/bin:/Users/shubhamsingh/Downloads/google-cloud-sdk/bin:/Users/shubhamsingh/.sdkman/candidates/java/current/bin:/Users/shubhamsingh/.sdkman/candidates/groovy/current/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin

11 verbose lifecycle authwidget@1.2.9~prepublishOnly: CWD: .

12 silly lifecycle authwidget@1.2.9~prepublishOnly: Args: [

12 silly lifecycle ‘-c’,

12 silly lifecycle node --eval "console.error('ERROR: Trying to publish a package that has been compiled by Ivy. This is not allowed.\\nPlease delete and rebuild the package, without compiling with Ivy, before attempting to publish.\\n')" && exit 1

12 silly lifecycle ]

13 silly lifecycle authwidget@1.2.9~prepublishOnly: Returned: code: 1 signal: null

14 info lifecycle authwidget@1.2.9~prepublishOnly: Failed to exec prepublishOnly script

15 verbose stack Error: authwidget@1.2.9 prepublishOnly: node --eval "console.error('ERROR: Trying to publish a package that has been compiled by Ivy. This is not allowed.\nPlease delete and rebuild the package, without compiling with Ivy, before attempting to publish.\n')" && exit 1

15 verbose stack Exit status 1

15 verbose stack at EventEmitter. (/Users/shubhamsingh/.nvm/versions/node/v14.15.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)

15 verbose stack at EventEmitter.emit (events.js:315:20)

15 verbose stack at ChildProcess. (/Users/shubhamsingh/.nvm/versions/node/v14.15.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)

15 verbose stack at ChildProcess.emit (events.js:315:20)

15 verbose stack at maybeClose (internal/child_process.js:1048:16)

15 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)

16 verbose pkgid authwidget@1.2.9

17 verbose cwd xxxxxx

18 verbose Darwin 22.6.0

19 verbose argv “/Users/shubhamsingh/.nvm/versions/node/v14.15.0/bin/node” “/Users/shubhamsingh/.nvm/versions/node/v14.15.0/bin/npm” “publish”

20 verbose node v14.15.0

21 verbose npm v6.14.8

22 error code ELIFECYCLE

23 error errno 1

24 error authwidget@1.2.9 prepublishOnly: node --eval "console.error('ERROR: Trying to publish a package that has been compiled by Ivy. This is not allowed.\nPlease delete and rebuild the package, without compiling with Ivy, before attempting to publish.\n')" && exit 1

24 error Exit status 1

25 error Failed at the authwidget@1.2.9 prepublishOnly script.

25 error This is probably not a problem with npm. There is likely additional logging output above.

26 verbose exit [ 1, true ]

This isn’t an issue with Nexus this is a local issue with your build