Unexpected "not a child of" error #18233
Comments
I'm also seeing this issue with npm 5.3.0 and node 8.4 and fsevents in a monorepo style repo. npm ERR! /blabla/node_modules/fsevents/node_modules/abbrev is not a child of /blabla2 |
Same issue here with current docker node:8.4.0-alpine node v8.4.0 and npm 5.3.0
Edit 1: here is my Dockerfile (my node app is a cli I need to install in global PATH) FROM node:8.4.0-alpine
ENV user node
ENV PATH=/home/node/.npm-global/bin:$PATH
ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
RUN mkdir /home/$user/app
COPY . /home/$user/app/
RUN chown -R $user: /home/$user/app
USER $user
RUN mkdir /home/$user/.npm-global
WORKDIR /home/$user/app
RUN npm -g i
ENTRYPOINT ["myapp"] Edit 2: Tried with node:8.1.0-alpine and it's working (node 8.1.0 and npm 5.0.3). CONCLUSION : Problem is probably related to NPM 5.3.0 ! |
Same issue, also with fsevents/node_modules/abbrev:
NPM version: 5.3.0 |
|
Thanks for the workaround @asado7, I'm also running into this issue in npm 5,4,2 with node 6.11.3 |
) ### Problem Due to change introduced in [npm/npm-15900](npm/npm#15900), source level dependencies are no longer installed, but symlinked directly. This means we can no longer reference dependencies of dependencies directly any more since they will no longer be on execution path. Additionally, due to an open npm issue npm/npm#18233, we need to add '--no-optional' in npm install command to workaround temporarily. ### Solution The fix is to supply all resolved node modules as a part of execution path. This can potentially have another side effect that is we might end up with two versions of same binaries on the execution path. I am not sure if there is a good way to resolve this issue at current time, but we should keep an eye on the possibility. ### Result Travis tests running with node 8.6.0 (npm 5.3.0) passes. https://travis-ci.org/pantsbuild/pants/builds/286743908 => Failed on shard 1 with unrelated issues.
Same here on linux
|
Does anyone have a solution to this? |
I'm opening this issue because:
What's going wrong?
Basically I would want to reopen #17637. Because I still see this with npm 5.3.0 and node 8.4
How can the CLI team reproduce the problem?
package.json should contain a relative path to a dependency, which in turn contains some
optional dependencies. (
fsevents
) in my case.gist: https://gist.github.com/ashubham/da37468a1033af23113938036522a036
supporting information:
OS: Linux
The text was updated successfully, but these errors were encountered: