Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Can't webpack #45

Closed
kabo opened this issue Sep 30, 2018 · 4 comments
Closed

Can't webpack #45

kabo opened this issue Sep 30, 2018 · 4 comments

Comments

@kabo
Copy link

kabo commented Sep 30, 2018

Here's what I've done

git clone https://github.com/chenglou/reason-react-example.git
cd reason-react-example
yarn install
yarn start
# in another tab
yarn webpack

The webpack command returns

$ webpack -w
/home/kabo/Documents/reason-react-example/node_modules/webpack-cli/bin/config-yargs.js:89
                                describe: optionsSchema.definitions.output.properties.path.description,
                                                                           ^

TypeError: Cannot read property 'properties' of undefined
    at module.exports (/home/kabo/Documents/reason-react-example/node_modules/webpack-cli/bin/config-yargs.js:89:48)
    at /home/kabo/Documents/reason-react-example/node_modules/webpack-cli/bin/webpack.js:60:27
    at Object.<anonymous> (/home/kabo/Documents/reason-react-example/node_modules/webpack-cli/bin/webpack.js:515:3)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Seems like a webpack-cli bug I thought to myself.

yarn upgrade-interactive --latest # upgraded webpack-cli to 3.1.2
yarn webpack

This time the webpack command returns

$ webpack -w

webpack is watching the files…

Hash: a96d3768fd9798477d52
Version: webpack 4.20.2
Time: 1296ms
Built at: 2018-09-30 17:27:31
           Asset      Size         Chunks             Chunk Names
    animation.js   840 KiB      animation  [emitted]  animation
        async.js   101 KiB          async  [emitted]  async
        fetch.js   139 KiB          fetch  [emitted]  fetch
      interop.js   773 KiB        interop  [emitted]  interop
retainedProps.js  73.6 KiB  retainedProps  [emitted]  retainedProps
       simple.js  98.3 KiB         simple  [emitted]  simple
      todomvc.js   431 KiB        todomvc  [emitted]  todomvc
Entrypoint async = async.js
Entrypoint simple = simple.js
Entrypoint fetch = fetch.js
Entrypoint todomvc = todomvc.js
Entrypoint interop = interop.js
Entrypoint retainedProps = retainedProps.js
Entrypoint animation = animation.js
[./src/animation/AnimationRoot.bs.js] 359 bytes {animation} [built]
[./src/animation/Reanimate.bs.js] 55.4 KiB {animation} [built]
[./src/async/Counter.bs.js] 1.82 KiB {async} [built]
[./src/async/CounterRoot.bs.js] 328 bytes {async} [built]
[./src/fetch/FetchExample.bs.js] 3.92 KiB {fetch} [built]
[./src/fetch/FetchExampleRoot.bs.js] 343 bytes {fetch} [built]
[./src/interop/GreetingRe.bs.js] 1.7 KiB {interop} [built]
[./src/interop/InteropRoot.js] 578 bytes {interop} [built]
[./src/retainedProps/RetainedPropsExample.bs.js] 1.5 KiB {retainedProps} [built]
[./src/retainedProps/RetainedPropsRoot.bs.js] 626 bytes {retainedProps} [built]
[./src/simple/Page.bs.js] 1.42 KiB {simple} [built]
[./src/simple/SimpleRoot.bs.js] 329 bytes {simple} [built]
[./src/todomvc/App.bs.js] 16.2 KiB {todomvc} [built]
[./src/todomvc/TodoFooter.bs.js] 3.83 KiB {todomvc} [built]
[./src/todomvc/TodoItem.bs.js] 7.62 KiB {todomvc} [built]
    + 59 hidden modules

ERROR in ./src/fetch/FetchExample.bs.js
Module not found: Error: Can't resolve '@glennsl/bs-json/src/Json_decode.bs.js' in '/home/kabo/Documents/reason-react-example/src/fetch'
 @ ./src/fetch/FetchExample.bs.js 7:0-70 11:12-29 12:17-34 12:35-53
 @ ./src/fetch/FetchExampleRoot.bs.js

ERROR in ./src/animation/AnimationRoot.bs.js
Module not found: Error: Can't resolve 'reason-react/src/ReactDOMRe.js' in '/home/kabo/Documents/reason-react-example/src/animation'
 @ ./src/animation/AnimationRoot.bs.js 4:0-61 7:0-32

ERROR in ./src/async/CounterRoot.bs.js
Module not found: Error: Can't resolve 'reason-react/src/ReactDOMRe.js' in '/home/kabo/Documents/reason-react-example/src/async'
 @ ./src/async/CounterRoot.bs.js 4:0-61 7:0-32

ERROR in ./src/fetch/FetchExampleRoot.bs.js
Module not found: Error: Can't resolve 'reason-react/src/ReactDOMRe.js' in '/home/kabo/Documents/reason-react-example/src/fetch'
 @ ./src/fetch/FetchExampleRoot.bs.js 3:0-61 7:0-32

ERROR in ./src/retainedProps/RetainedPropsRoot.bs.js
Module not found: Error: Can't resolve 'reason-react/src/ReactDOMRe.js' in '/home/kabo/Documents/reason-react-example/src/retainedProps'
 @ ./src/retainedProps/RetainedPropsRoot.bs.js 3:0-61 12:9-41

and the output continues like that for a good deal longer.

Any ideas?

@kabo
Copy link
Author

kabo commented Sep 30, 2018

Interesting, I tried it with npm instead of yarn, and that seems to work...

@rrousselGit
Copy link

I used npm, and got that error.

Most likely a breaking change somewhere

@jcarraway
Copy link

Downgrade the webpack-cli version for a quick fix yarn add webpack-cli@2.0.10

@chenglou
Copy link
Collaborator

chenglou commented Oct 4, 2018

Damn it webpack... Thanks, fixed.

@chenglou chenglou closed this as completed Oct 4, 2018
chenglou added a commit that referenced this issue Oct 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants