Мое приложение зависит от Kepler.gl, а Kepler.gl зависит от Kepler.gl, но мне нужно изменить оба локально.
Мое решение - клонировать оба хранилища и локально связать их каталоги в моем приложении.папка node_modules.Например:
myapp/
deck.gl/
kepler.gl/
package.json
node_modules/
kepler.gl (link to ../kepler.gl)
deck.gl (link to ../deck.gl)
Проблема в том, что после того, как я связал их с помощью ссылки на пряжу и попытался запустить мое приложение с запуском пряжи, я получаю ошибки зависимости.
Я пробовал связывать колоду.gl в kepler.gl node_modules, например:
myapp/
deck.gl/
kepler.gl/
node_modules/
deck.gl (link to ../deck.gl)
package.json
node_modules/
kepler.gl (link to ../kepler.gl)
deck.gl (link to ../deck.gl)
Но у меня такая же ошибка.
Я ожидал, что приложение запустится нормально, но затем я получаю следующие ошибки:
webpack: Compiling...
Hash: b097af3df7b58ea09797
Version: webpack 2.7.0
Time: 410ms
chunk {0} bundle.js, bundle.js.map (app) 13.2 MB [entry]
[1694] ./~/moment/locale ^\.\/.*$ 3.07 kB {0} [optional] [built]
[2021] (webpack)/hot nonrecursive ^\.\/log$ 160 bytes {0} [built]
+ 2025 hidden modules
WARNING in EnvironmentPlugin - MapboxAccessToken environment variable is undefined.
You can pass an object with default values to suppress this warning.
See https://webpack.js.org/plugins/environment-plugin for example.
ERROR in ./kepler.gl/dist/components/map-container.js
Module not found: Error: Can't resolve 'deck.gl' in '/hdd/home/green/dCluster/frontend/kepler.gl/dist/components'
@ ./kepler.gl/dist/components/map-container.js 36:35-53
@ ./kepler.gl/dist/components/index.js
@ ./kepler.gl/dist/index.js
@ ./src/app.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8082 webpack/hot/dev-server ./src/main.js
ERROR in ./kepler.gl/dist/layers/point-layer/point-layer.js
Module not found: Error: Can't resolve 'deck.gl' in '/hdd/home/green/dCluster/frontend/kepler.gl/dist/layers/point-layer'
@ ./kepler.gl/dist/layers/point-layer/point-layer.js 30:12-30
@ ./kepler.gl/dist/layers/index.js
@ ./kepler.gl/dist/index.js
@ ./src/app.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8082 webpack/hot/dev-server ./src/main.js
ERROR in ./kepler.gl/dist/layers/grid-layer/grid-layer.js
Module not found: Error: Can't resolve 'deck.gl' in '/hdd/home/green/dCluster/frontend/kepler.gl/dist/layers/grid-layer'
@ ./kepler.gl/dist/layers/grid-layer/grid-layer.js 26:12-30
@ ./kepler.gl/dist/layers/index.js
@ ./kepler.gl/dist/index.js
@ ./src/app.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8082 webpack/hot/dev-server ./src/main.js
ERROR in ./kepler.gl/dist/layers/hexagon-layer/hexagon-layer.js
Module not found: Error: Can't resolve 'deck.gl' in '/hdd/home/green/dCluster/frontend/kepler.gl/dist/layers/hexagon-layer'
@ ./kepler.gl/dist/layers/hexagon-layer/hexagon-layer.js 24:12-30
@ ./kepler.gl/dist/layers/index.js
@ ./kepler.gl/dist/index.js
@ ./src/app.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8082 webpack/hot/dev-server ./src/main.js
ERROR in ./kepler.gl/dist/layers/geojson-layer/geojson-layer.js
Module not found: Error: Can't resolve 'deck.gl' in '/hdd/home/green/dCluster/frontend/kepler.gl/dist/layers/geojson-layer'
@ ./kepler.gl/dist/layers/geojson-layer/geojson-layer.js 34:12-30
@ ./kepler.gl/dist/layers/index.js
@ ./kepler.gl/dist/index.js
@ ./src/app.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8082 webpack/hot/dev-server ./src/main.js
ERROR in ./kepler.gl/dist/layers/h3-hexagon-layer/h3-hexagon-layer.js
Module not found: Error: Can't resolve 'deck.gl' in '/hdd/home/green/dCluster/frontend/kepler.gl/dist/layers/h3-hexagon-layer'
@ ./kepler.gl/dist/layers/h3-hexagon-layer/h3-hexagon-layer.js 30:12-30
@ ./kepler.gl/dist/layers/index.js
@ ./kepler.gl/dist/index.js
@ ./src/app.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8082 webpack/hot/dev-server ./src/main.js
ERROR in ./kepler.gl/dist/deckgl-layers/scatterplot-brushing-layer/scatterplot-brushing-layer.js
Module not found: Error: Can't resolve 'deck.gl' in '/hdd/home/green/dCluster/frontend/kepler.gl/dist/deckgl-layers/scatterplot-brushing-layer'
@ ./kepler.gl/dist/deckgl-layers/scatterplot-brushing-layer/scatterplot-brushing-layer.js 24:12-30
@ ./kepler.gl/dist/layers/point-layer/point-layer.js
@ ./kepler.gl/dist/layers/index.js
@ ./kepler.gl/dist/index.js
@ ./src/app.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8082 webpack/hot/dev-server ./src/main.js
ERROR in ./kepler.gl/dist/deckgl-layers/arc-brushing-layer/arc-brushing-layer.js
Module not found: Error: Can't resolve 'deck.gl' in '/hdd/home/green/dCluster/frontend/kepler.gl/dist/deckgl-layers/arc-brushing-layer'
@ ./kepler.gl/dist/deckgl-layers/arc-brushing-layer/arc-brushing-layer.js 24:12-30
@ ./kepler.gl/dist/layers/arc-layer/arc-layer.js
@ ./kepler.gl/dist/layers/index.js
@ ./kepler.gl/dist/index.js
@ ./src/app.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8082 webpack/hot/dev-server ./src/main.js
ERROR in ./kepler.gl/dist/deckgl-layers/line-layer/line-layer.js
Module not found: Error: Can't resolve 'deck.gl' in '/hdd/home/green/dCluster/frontend/kepler.gl/dist/deckgl-layers/line-layer'
@ ./kepler.gl/dist/deckgl-layers/line-layer/line-layer.js 24:12-30
@ ./kepler.gl/dist/layers/line-layer/line-layer.js
@ ./kepler.gl/dist/layers/index.js
@ ./kepler.gl/dist/index.js
@ ./src/app.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8082 webpack/hot/dev-server ./src/main.js
ERROR in ./kepler.gl/dist/deckgl-layers/grid-layer/enhanced-grid-layer.js
Module not found: Error: Can't resolve 'deck.gl' in '/hdd/home/green/dCluster/frontend/kepler.gl/dist/deckgl-layers/grid-layer'
@ ./kepler.gl/dist/deckgl-layers/grid-layer/enhanced-grid-layer.js 24:12-30
@ ./kepler.gl/dist/layers/grid-layer/grid-layer.js
@ ./kepler.gl/dist/layers/index.js
@ ./kepler.gl/dist/index.js
@ ./src/app.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8082 webpack/hot/dev-server ./src/main.js
ERROR in ./kepler.gl/dist/layers/grid-layer/grid-utils.js
Module not found: Error: Can't resolve 'deck.gl' in '/hdd/home/green/dCluster/frontend/kepler.gl/dist/layers/grid-layer'
@ ./kepler.gl/dist/layers/grid-layer/grid-utils.js 8:12-30
@ ./kepler.gl/dist/layers/grid-layer/grid-layer.js
@ ./kepler.gl/dist/layers/index.js
@ ./kepler.gl/dist/index.js
@ ./src/app.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8082 webpack/hot/dev-server ./src/main.js
ERROR in ./kepler.gl/dist/deckgl-layers/hexagon-layer/enhanced-hexagon-layer.js
Module not found: Error: Can't resolve 'deck.gl' in '/hdd/home/green/dCluster/frontend/kepler.gl/dist/deckgl-layers/hexagon-layer'
@ ./kepler.gl/dist/deckgl-layers/hexagon-layer/enhanced-hexagon-layer.js 24:12-30
@ ./kepler.gl/dist/layers/hexagon-layer/hexagon-layer.js
@ ./kepler.gl/dist/layers/index.js
@ ./kepler.gl/dist/index.js
@ ./src/app.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8082 webpack/hot/dev-server ./src/main.js
ERROR in ./kepler.gl/dist/layers/hexagon-layer/hexagon-utils.js
Module not found: Error: Can't resolve 'deck.gl' in '/hdd/home/green/dCluster/frontend/kepler.gl/dist/layers/hexagon-layer'
@ ./kepler.gl/dist/layers/hexagon-layer/hexagon-utils.js 8:12-30
@ ./kepler.gl/dist/layers/hexagon-layer/hexagon-layer.js
@ ./kepler.gl/dist/layers/index.js
@ ./kepler.gl/dist/index.js
@ ./src/app.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8082 webpack/hot/dev-server ./src/main.js
ERROR in ./kepler.gl/dist/deckgl-layers/cluster-layer/cluster-layer.js
Module not found: Error: Can't resolve 'deck.gl' in '/hdd/home/green/dCluster/frontend/kepler.gl/dist/deckgl-layers/cluster-layer'
@ ./kepler.gl/dist/deckgl-layers/cluster-layer/cluster-layer.js 22:12-30
@ ./kepler.gl/dist/layers/cluster-layer/cluster-layer.js
@ ./kepler.gl/dist/layers/index.js
@ ./kepler.gl/dist/index.js
@ ./src/app.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8082 webpack/hot/dev-server ./src/main.js
ERROR in ./kepler.gl/dist/deckgl-layers/svg-icon-layer/svg-icon-layer.js
Module not found: Error: Can't resolve 'deck.gl' in '/hdd/home/green/dCluster/frontend/kepler.gl/dist/deckgl-layers/svg-icon-layer'
@ ./kepler.gl/dist/deckgl-layers/svg-icon-layer/svg-icon-layer.js 22:12-30
@ ./kepler.gl/dist/layers/icon-layer/icon-layer.js
@ ./kepler.gl/dist/layers/index.js
@ ./kepler.gl/dist/index.js
@ ./src/app.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8082 webpack/hot/dev-server ./src/main.js
ERROR in ./kepler.gl/dist/deckgl-layers/h3-hexagon-cell-layer/h3-hexagon-cell-layer.js
Module not found: Error: Can't resolve 'deck.gl' in '/hdd/home/green/dCluster/frontend/kepler.gl/dist/deckgl-layers/h3-hexagon-cell-layer'
@ ./kepler.gl/dist/deckgl-layers/h3-hexagon-cell-layer/h3-hexagon-cell-layer.js 24:12-30
@ ./kepler.gl/dist/layers/h3-hexagon-layer/h3-hexagon-layer.js
@ ./kepler.gl/dist/layers/index.js
@ ./kepler.gl/dist/index.js
@ ./src/app.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8082 webpack/hot/dev-server ./src/main.js
ERROR in ./kepler.gl/dist/deckgl-layers/grid-layer/enhanced-grid-cell-layer.js
Module not found: Error: Can't resolve 'deck.gl' in '/hdd/home/green/dCluster/frontend/kepler.gl/dist/deckgl-layers/grid-layer'
@ ./kepler.gl/dist/deckgl-layers/grid-layer/enhanced-grid-cell-layer.js 24:12-30
@ ./kepler.gl/dist/deckgl-layers/grid-layer/enhanced-grid-layer.js
@ ./kepler.gl/dist/layers/grid-layer/grid-layer.js
@ ./kepler.gl/dist/layers/index.js
@ ./kepler.gl/dist/index.js
@ ./src/app.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8082 webpack/hot/dev-server ./src/main.js
ERROR in ./kepler.gl/dist/deckgl-layers/hexagon-layer/enhanced-hexagon-cell-layer.js
Module not found: Error: Can't resolve 'deck.gl' in '/hdd/home/green/dCluster/frontend/kepler.gl/dist/deckgl-layers/hexagon-layer'
@ ./kepler.gl/dist/deckgl-layers/hexagon-layer/enhanced-hexagon-cell-layer.js 24:12-30
@ ./kepler.gl/dist/deckgl-layers/hexagon-layer/enhanced-hexagon-layer.js
@ ./kepler.gl/dist/layers/hexagon-layer/hexagon-layer.js
@ ./kepler.gl/dist/layers/index.js
@ ./kepler.gl/dist/index.js
@ ./src/app.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8082 webpack/hot/dev-server ./src/main.js
ERROR in ./kepler.gl/dist/deckgl-layers/svg-icon-layer/scatterplot-icon-layer.js
Module not found: Error: Can't resolve 'deck.gl' in '/hdd/home/green/dCluster/frontend/kepler.gl/dist/deckgl-layers/svg-icon-layer'
@ ./kepler.gl/dist/deckgl-layers/svg-icon-layer/scatterplot-icon-layer.js 22:12-30
@ ./kepler.gl/dist/deckgl-layers/svg-icon-layer/svg-icon-layer.js
@ ./kepler.gl/dist/layers/icon-layer/icon-layer.js
@ ./kepler.gl/dist/layers/index.js
@ ./kepler.gl/dist/index.js
@ ./src/app.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8082 webpack/hot/dev-server ./src/main.js
ERROR in ./~/@deck.gl/experimental-layers/dist/esm/tile-layer/tile-layer.js
Module not found: Error: Can't resolve 'deck.gl' in '/hdd/home/green/dCluster/frontend/node_modules/@deck.gl/experimental-layers/dist/esm/tile-layer'
@ ./~/@deck.gl/experimental-layers/dist/esm/tile-layer/tile-layer.js 27:0-55
@ ./~/@deck.gl/experimental-layers/dist/esm/index.js
@ ./kepler.gl/dist/deckgl-layers/3d-building-layer/3d-building-layer.js
@ ./kepler.gl/dist/components/map-container.js
@ ./kepler.gl/dist/components/index.js
@ ./kepler.gl/dist/index.js
@ ./src/app.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8082 webpack/hot/dev-server ./src/main.js
webpack: Failed to compile.