Since .travis.yml specified a node version, it would use this version instead of the .nvmrc specified verison. This caused the publish step to use an older version of Node, which had a different fs module, thus failing on the build step. By removing the node version from .travis.yml, Travis automatically uses the .nvmrc version.
Additional changes:
Changed all npm run calls to yarn
Made sure that the build fails correctly when publish fails
Normalize the fs/path function usage in scripts/rm-build.js
Since .travis.yml specified a node version, it would use this version instead of the .nvmrc specified verison. This caused the publish step to use an older version of Node, which had a different
fs
module, thus failing on the build step. By removing the node version from .travis.yml, Travis automatically uses the .nvmrc version.Additional changes:
npm run
calls toyarn
scripts/rm-build.js