mapbox / mapbox-gl-draw

Draw tools for mapbox-gl-js
https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/
ISC License
953 stars 593 forks source link

Cannot find module 'envify' when using npm version of Mapbox draw #861

Closed briandaviddavidson closed 4 years ago

briandaviddavidson commented 5 years ago

mapbox-gl-js version: ^0.52.0 mapbox-gl-draw version: ^1.1.1

Steps to Trigger Behavior

  1. npm install @mapbox/mapbox-gl-draw --save
  2. Add const MapboxDraw = require("@mapbox/mapbox-gl-draw") to index.js file
  3. Create new Mapbox Draw
    const draw = new MapboxDraw({
    displayControlsDefault: false,
    controls: {
    line_string: true,
    trash: true
    }
    });
  4. npm start

Expected Behavior

Mapbox draw would load and be ready to use with a line_string and trash button.

Actual Behavior

screen shot 2019-01-23 at 3 49 57 pm
kkaefer commented 4 years ago

fixed