Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

May not work with Node v7 or npm v4 #14

Open
wearhere opened this issue Mar 6, 2018 · 2 comments
Open

May not work with Node v7 or npm v4 #14

wearhere opened this issue Mar 6, 2018 · 2 comments

Comments

@wearhere
Copy link
Contributor

wearhere commented Mar 6, 2018

Moving from mixmaxhq/eb-fix-npm#11, a stacktrace from @ Ewg777:

node_modules\install-files\src\hostPackageDir.js:12
var pathComponents = file.split(path.sep);
^
TypeError: Cannot read property 'split' of undefined
at hostPackageDir (C:\Users\user\untitled\node_modules\install-files\src\hostPackageDir.js:12:28)
at installFiles (C:\Users\user\untitled\node_modules\install-files\src\index.js:45:35)
at Object. (C:\Users\user\untitled\node_modules\install-files\bin\install-files.js:16:1)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:427:7)
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "eb-fix-npm" "--save-dev"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1

npm ERR! [email protected] install: install-files source
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'install-files source'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the eb-fix-npm package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! install-files source
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs eb-fix-npm
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls eb-fix-npm
npm ERR! There is likely additional logging output above.

Note that eb-fix-npm uses install-files^1.0.0. I would not expect this issue to be fixed by 2.0.0 however.

This error indicates that process.env._ is undefined here for some reason.

Mixmax has not seen this issue yet. We use Yarn 0.24.6 and Node 8.9.3.

@wearhere wearhere changed the title install-files may not work with Node v7 or npm v4 May not work with Node v7 or npm v4 Mar 6, 2018
@skeggse
Copy link
Contributor

skeggse commented Jul 3, 2018

That environment variable looks to be bash-specific fyi. Moving to using PWD should be far more reliable.

@wearhere
Copy link
Contributor Author

wearhere commented Jul 3, 2018

Oh interesting. I think this will still throw though… we should probably only try to use process.env._ if we need it, in the first or third branches here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants