Npm with git-submodules: package not found -
i'm using: git version 2.12.2.windows.2 node -v v6.10.3 npm -v 5.3.0
i had following project structure:
- main project
- package.json
- node_modules
- dependencies
- npm linked sub project core a
- npm linked sub project core b
- sub project core
- package.json
- node_modules
- dependencies
- sub project core b
- package.json
- node_modules
- dependencies
- sub project
- package.json
- node_modules
- dependencies
- sub project b
- package.json
- node_modules
- dependencies
- sub project c
- package.json
- node_modules
- dependencies
sub project a,b,c needing sub core project , b. every project versioned git.
using structure running , building of projects fine resulted in major problems: 90% of dependencies same resulting in tons of duplicate packages. installing packages in every project takes massive amount of time. npm install anywhere without removing symlinks removed packages should not removed. restructured project following structure:
adding main project git , add sub projects git submodule.
- main project
- package.json
- "sub project core a": "file:sub project core a",
- ...
- "sub project a": "file:sub project a",
- ...
- node_modules
- shared dependencies
- sub project core
- package.json
- node_modules
- non shared dependencies
- sub project core b
- package.json
- node_modules
- non shared dependencies
- sub project
- package.json
- node_modules
- non shared dependencies
- sub project b
- package.json
- node_modules
- non shared dependencies
- sub project c
- package.json
- node_modules
- non shared dependencies
- package.json
so have single git clone on main project , single npm install. , in theory should work fine because when project cant find dependency looks in ascendant hierarchy (one node_modules folder higher) , works (which made the first structure work @ all).
but when npm run/lib/whatever sais package xyz not found, in main project node_modules folder.
edit1: maybe misconfiguration of webpack? why did work in firstplace then. exact error: der befehl "rimraf" ist entweder falsch geschrieben oder konnte nicht gefunden werden. : command "rimraf" either misspelled or not found.
Comments
Post a Comment