alexanderGugel / alexanderGugel/ied

npm installed dependencies crash ied `Error: EINVAL: invalid argument, readlink`

Open
#44 5 comments 5 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2k
Forks
51
PR merge metrics
No merged PRs in 30d

Description

If you have dependencies installed with npm i.e. as a non-symlink dir `node_modules/dependency_name`, ied will crash when it tries to readlink the dir.

```
> mkdir ied-npm-crash
> cd ied-npm-crash
> npm init -f
npm WARN using --force I sure hope you know what you are doing.
Wrote to /Users/timoxley/Projects/tests/ied-npm-crash/package.json:

{
"name": "ied-npm-crash",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "Tim Oxley ",
"license": "ISC"
}
> npm install --save mkdirp
npm WARN package.json ied-npm-crash@1.0.0 No description
npm WARN package.json ied-npm-crash@1.0.0 No repository field.
npm WARN package.json ied-npm-crash@1.0.0 No README data
npm http request GET https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/mkdirp
npm http request GET https://registry.npmjs.org/minimist
npm http 304 https://registry.npmjs.org/minimist
mkdirp@0.5.1 node_modules/mkdirp
└── minimist@0.0.8

> ied install
/usr/local/lib/node_modules/ied/lib/install_cmd.js:65
if (err) throw err
^

Error: EINVAL: invalid argument, readlink '/Users/timoxley/Projects/tests/ied-npm-crash/node_modules/mkdirp'
at Error (native)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.