Schmavery / reprocessing

ReasonML graphics library inspired by Processing
https://schmavery.github.io/reprocessing/
MIT License
682 stars 24 forks source link

Missing files after npm install? #35

Closed ryanartecona closed 7 years ago

ryanartecona commented 7 years ago

Following up after #34, I ran into some trouble after doing npm update Reprocessing.

My bsb -clean-world -make-world -w gave me this error:

[1/18] Building src/Reprocessing_ClientWrapper.c...ssing_ClientWrapper.js src/Reprocessing_ClientWrapper.cmi
FAILED: src/Reprocessing_ClientWrapper.cmj /Users/ryanartecona/Code/Reason/fitzhugh/node_modules/Reprocessing/lib/js/src/Reprocessing_ClientWrapper.js src/Reprocessing_ClientWrapper.cmi
/Users/ryanartecona/Code/Reason/fitzhugh/node_modules/bs-platform/bin/bsc.exe -bs-package-name Reprocessing  -bs-package-output commonjs:lib/js/src -bs-assume-no-mli -bs-no-builtin-ppx-ml -bs-no-implicit-include -I /Users/ryanartecona/Code/Reason/fitzhugh/node_modules/ReasonglInterface/lib/ocaml -I /Users/ryanartecona/Code/Reason/fitzhugh/node_modules/ReasonglWeb/lib/ocaml -I /Users/ryanartecona/Code/Reason/fitzhugh/node_modules/ReasonglNative/lib/ocaml -I src  -nostdlib -I '/Users/ryanartecona/Code/Reason/fitzhugh/node_modules/bs-platform/lib/ocaml' -no-alias-deps -color always -w -40+6+7+27+32..39+44+45 -o src/Reprocessing_ClientWrapper.mlast -c  src/Reprocessing_ClientWrapper.mlast
File "/Users/ryanartecona/Code/Reason/fitzhugh/node_modules/Reprocessing/src/Reprocessing_ClientWrapper.re", line 1, characters 11-25:
Error: Unbound module Gl
[4/18] Building src/Reprocessing_Events.cmj /Use...js/src/Reprocessing_Events.js src/Reprocessing_Events.cmi
ninja: build stopped: subcommand failed.

And my webpack was also unhappy:

ERROR in ./lib/js/src/main.js
Module not found: Error: Can't resolve 'Reprocessing/lib/js/src/reprocessing.js' in '/Users/ryanartecona/Code/Reason/fitzhugh/lib/js/src'
 @ ./lib/js/src/main.js 6:29-79
 @ multi (webpack)-dev-server/client?http://localhost:8000 ./lib/js/src/main

ERROR in ./lib/js/src/main.js
Module not found: Error: Can't resolve 'Reprocessing/lib/js/src/reprocessing_Env.js' in '/Users/ryanartecona/Code/Reason/fitzhugh/lib/js/src'
 @ ./lib/js/src/main.js 7:29-83
 @ multi (webpack)-dev-server/client?http://localhost:8000 ./lib/js/src/main

ERROR in ./lib/js/src/main.js
Module not found: Error: Can't resolve 'Reprocessing/lib/js/src/reprocessing_Draw.js' in '/Users/ryanartecona/Code/Reason/fitzhugh/lib/js/src'
 @ ./lib/js/src/main.js 8:29-84
 @ multi (webpack)-dev-server/client?http://localhost:8000 ./lib/js/src/main

ERROR in ./lib/js/src/main.js
Module not found: Error: Can't resolve 'Reprocessing/lib/js/src/reprocessing_Constants.js' in '/Users/ryanartecona/Code/Reason/fitzhugh/lib/js/src'
 @ ./lib/js/src/main.js 9:29-89
 @ multi (webpack)-dev-server/client?http://localhost:8000 ./lib/js/src/main
webpack: Failed to compile.

Looking into it a tiny bit, it appears those files are indeed missing inside my node_modules dir:

tree node_modules/Reprocessing ``` $ tree node_modules/Reprocessing node_modules/Reprocessing/ ├── README.md ├── assets │   ├── font │   │   ├── font.fnt │   │   └── font.png │   └── img_test.png ├── bsconfig.json ├── deploy.sh ├── examples │   ├── index.re │   ├── noise.re │   └── redsquare.re ├── index.html ├── lib │   ├── bs │   │   ├── build.ninja │   │   └── src │   │   ├── Reprocessing.mlast │   │   ├── Reprocessing.mlast.d │   │   ├── Reprocessing.mliast │   │   ├── Reprocessing.mliast.d │   │   ├── Reprocessing_ClientWrapper.cmt │   │   ├── Reprocessing_ClientWrapper.mlast │   │   ├── Reprocessing_ClientWrapper.mlast.d │   │   ├── Reprocessing_Common.mlast │   │   ├── Reprocessing_Common.mlast.d │   │   ├── Reprocessing_Constants.mlast │   │   ├── Reprocessing_Constants.mlast.d │   │   ├── Reprocessing_Constants.mliast │   │   ├── Reprocessing_Constants.mliast.d │   │   ├── Reprocessing_Draw.mlast │   │   ├── Reprocessing_Draw.mlast.d │   │   ├── Reprocessing_Draw.mliast │   │   ├── Reprocessing_Draw.mliast.d │   │   ├── Reprocessing_Env.mlast │   │   ├── Reprocessing_Env.mlast.d │   │   ├── Reprocessing_Env.mliast │   │   ├── Reprocessing_Env.mliast.d │   │   ├── Reprocessing_Events.cmi │   │   ├── Reprocessing_Events.cmj │   │   ├── Reprocessing_Events.cmt │   │   ├── Reprocessing_Events.mlast │   │   ├── Reprocessing_Events.mlast.d │   │   ├── Reprocessing_Font.mlast │   │   ├── Reprocessing_Font.mlast.d │   │   ├── Reprocessing_Internal.mlast │   │   ├── Reprocessing_Internal.mlast.d │   │   ├── Reprocessing_Matrix.cmi │   │   ├── Reprocessing_Matrix.cmj │   │   ├── Reprocessing_Matrix.cmt │   │   ├── Reprocessing_Matrix.mlast │   │   ├── Reprocessing_Matrix.mlast.d │   │   ├── Reprocessing_Shaders.cmi │   │   ├── Reprocessing_Shaders.cmj │   │   ├── Reprocessing_Shaders.cmt │   │   ├── Reprocessing_Shaders.mlast │   │   ├── Reprocessing_Shaders.mlast.d │   │   ├── Reprocessing_Types.mlast │   │   ├── Reprocessing_Types.mlast.d │   │   ├── Reprocessing_Utils.mlast │   │   ├── Reprocessing_Utils.mlast.d │   │   ├── Reprocessing_Utils.mliast │   │   └── Reprocessing_Utils.mliast.d │   └── js │   └── src │   ├── reprocessing_Events.js │   ├── reprocessing_Matrix.js │   └── reprocessing_Shaders.js ├── package.json ├── require_polyfill.js ├── src │   ├── Reprocessing.re │   ├── Reprocessing.rei │   ├── Reprocessing_ClientWrapper.re │   ├── Reprocessing_Common.re │   ├── Reprocessing_Constants.re │   ├── Reprocessing_Constants.rei │   ├── Reprocessing_Draw.re │   ├── Reprocessing_Draw.rei │   ├── Reprocessing_Env.re │   ├── Reprocessing_Env.rei │   ├── Reprocessing_Events.re │   ├── Reprocessing_Font.re │   ├── Reprocessing_Internal.re │   ├── Reprocessing_Matrix.re │   ├── Reprocessing_Shaders.re │   ├── Reprocessing_Types.re │   ├── Reprocessing_Utils.re │   └── Reprocessing_Utils.rei └── webenv-artifacts ├── Reprocessing_ClientWrapper.re ├── Reprocessing_Ext.re ├── deploy.sh ├── entrypoint.js └── reprocessing-bundle.js 10 directories, 85 files ```
Schmavery commented 7 years ago

Sorry, I recently introduced a bug that I thought I had pushed a fix for but I guess that change somehow got lost when committing. I've been working on improving the web environment here which has involved some more back and forth between branches than usual so I think that's what caused the mixup.

Schmavery commented 7 years ago

My guess would be that webpack was complaining because other files couldn't build as a result of Reprocessing_ClientWrapper failing to build, hopefully that will be resolved by this fix as well (lmk if not)

ryanartecona commented 7 years ago

Nice! No worries at all, thanks. Looks like that fixed it all for me, and your guess was correct.