npm publish stuck (using yarn)

1.4k views Asked by At

I'm trying to publish a new package. I'm using ES6, so I'm first transpiling my files using babel.

I'm stuck on this step:

enter image description here

This takes forever (waited more than an hour). No error messages, nothing happens.

Here's my package.json prepublish script and main.js:

  "scripts": {
    "prepublish": "babel -d lib/ src/"
  }
  "main": "./lib/index.js"

My index.js has some ES6 imports and one module.export. Here's my .npmignore file:

src/
yarn.lock
node_modules

I dont have any big filex in the directory (whole directory excluding node_modules has less than 1MB).

Thanks for any tips!

1

There are 1 answers

0
Matúš Čongrády On BEST ANSWER

As suggested by Shawn Erquhart, this is not an npm issue. It's caused by yarn package manager that I am using.

Related yarn issues:

https://github.com/yarnpkg/yarn/issues/1494

https://github.com/yarnpkg/yarn/issues/610

https://github.com/yarnpkg/yarn/issues/1694

I fixed it by using npm instead of yarn. (Had to reinstall node since npm wasn't recognized as a bash(CLI) command after installing yarn).