fullstackreact / google-maps-react

Companion code to the "How to Write a Google Maps React Component" Tutorial
https://www.fullstackreact.com/articles/how-to-write-a-google-maps-react-component/
MIT License
1.64k stars 819 forks source link

Module not found: Error: Cannot resolve 'file' or 'directory' ../dist in <ROOT>/examples #88

Open piousbox opened 7 years ago

piousbox commented 7 years ago

when doing npm run build for the first time I get:

piousbox@piousbox-e7440:~/projects/react/google-maps-react$ npm run build

> google-maps-react@1.0.18 build /home/piousbox/projects/react/google-maps-react
> NODE_ENV=production webpack

Hash: 7fb8c67302188dde623a
Version: webpack 1.15.0
Time: 9225ms
                       Asset       Size  Chunks             Chunk Names
 google-maps-react.1.0.18.js     757 kB       0  [emitted]  main
google-maps-react.1.0.18.css    1.91 kB       0  [emitted]  main
                  index.html  283 bytes          [emitted]  
   [0] multi main 28 bytes {0} [built]
    + 448 hidden modules

ERROR in ./examples/Container.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../dist in /home/piousbox/projects/react/google-maps-react/examples
 @ ./examples/Container.js 36:21-39
Child extract-text-webpack-plugin:
        + 2 hidden modules
Child extract-text-webpack-plugin:
        + 2 hidden modules
piousbox commented 7 years ago

For now I copy the dist/ folder from an already-build node_modules/google-maps-react/dist/ to bypass this