endel / increase-memory-limit

Increase memory limit for local node binaries ("max-old-space-size")
http://npmjs.com/package/increase-memory-limit
MIT License
269 stars 26 forks source link

First-time run after yarn install errors #11

Closed toddb closed 6 years ago

toddb commented 7 years ago

On the first time after an yarn (install/upgrade), the process finishes with exit code 1.

It appears that the last two digits from the cross-env LIMIT=2600 are then used for, well, something.

package.json

"fix-memory-limit": "cross-env LIMIT=2600 increase-memory-limit",
yarn run fix-memory-limit

Error:

node_modules\.bin\\..\cross-env\dist\bin\cross-env.js" LIMIT=2600 increase-memory-limit 
'00' is not recognized as an internal or external command,
operable program or batch file.
toddb commented 7 years ago

It looks like cross-env doesn't like being changed while it is running. Funny that. So, let's not update cross-env as well:

    if (file.indexOf('cross-env') >= 0) {
      return;
    }