hubtype / botonic

Build chatbots and conversational experiences using React
https://botonic.io
MIT License
526 stars 76 forks source link

Build error Error: Command failed: npm run build #20

Closed jakub-astrahit closed 5 years ago

jakub-astrahit commented 5 years ago

Hi, I'm new to this. I followed your installation steps in the Docs at https://botonic.io/docs/getting-started.html and it doesn't work. I use Windows 10, node v11.9.0, npm 6.5.0 and cygwin 3.0.7. Any ideas what could be wrong? I get this error:

image

$ botonic new myBot tutorial
- Copying files...
√ Copying files...
- Installing dependencies...
√ Installing dependencies...
- Building...
× Building...
Build error Error: Command failed: npm run build
clean-webpack-plugin: C:\users\jakub\web\myBot\dist has been removed.
[BABEL] Note: The code generator has deoptimised the styling of C:\users\jakub\web\myBot\node_modules\react-dom\cjs\react-dom.development.js as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of C:\users\jakub\web\myBot\node_modules\react-dom\cjs\react-dom.development.js as it exceeds the max of 500KB.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ build: `webpack --env.node`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\jakub\AppData\Roaming\npm-cache\_logs\2019-05-05T16_14_12_645Z-debug.log

✨  Bot myBot was successfully created!

Next steps:
cd myBot
botonic serve (test your bot locally from the browser)
botonic deploy (publish your bot to the world!)

When I run npm run build in myBot folder, I get a million warnings and this error:

ERROR in   Error: C:\users\jakub\web\myBot\node_modules\@botonic\react\src\webview.templa  te.html:130
      module.exports = _typeof;
                     ^
      TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
      - webview.template.html:130 Module.<anonymous>
        [myBot]/[@botonic]/react/src/webview.template.html:130:16

      - webview.template.html:131 Module../node_modules/@babel/runtime/helpers/typeo    f.js
        [myBot]/[@botonic]/react/src/webview.template.html:131:30

      - webview.template.html:21 __webpack_require__
        [myBot]/[@botonic]/react/src/webview.template.html:21:30

      - webview.template.html:17270 Module.<anonymous>
        [myBot]/[@botonic]/react/src/webview.template.html:17270:133

      - webview.template.html:17290 Module../node_modules/webpack/buildin/global.js
        [myBot]/[@botonic]/react/src/webview.template.html:17290:30

      - webview.template.html:21 __webpack_require__
        [myBot]/[@botonic]/react/src/webview.template.html:21:30

      - webview.template.html:17257 Object../node_modules/lodash/lodash.js
        [myBot]/[@botonic]/react/src/webview.template.html:17257:41

      - webview.template.html:21 __webpack_require__
        [myBot]/[@botonic]/react/src/webview.template.html:21:30

      - webview.template.html:142 Object../node_modules/html-webpack-plugin/lib/load    er.js!./node_modules/@botonic/react/src/webview.template.html
        [myBot]/[@botonic]/react/src/webview.template.html:142:9

      - webview.template.html:21 __webpack_require__
        [myBot]/[@botonic]/react/src/webview.template.html:21:30

    Child html-webpack-plugin for "index.html":
         1 asset
        Entrypoint undefined = index.html
           6 modules
davidrafaelb commented 5 years ago

I have the same error, If you find how solve it, please could you share here?

Khaeshah commented 5 years ago

@jakub-astrahit @davidrafaelb - can you try upgrading to 0.8.0-beta.5?

Run npm install -g @botonic/cli@0.8.0-beta.5

If everything is ok, instead of botonic serve use npm run start

davidrafaelb commented 5 years ago

@jakub-astrahit @davidrafaelb - can you try upgrading to 0.8.0-beta.5?

Run npm install -g @botonic/cli@0.8.0-beta.5

If everything is ok, instead of botonic serve use npm run start

I do what you said, but I have this new error

C:\Users\zf711lx\testBot>npm run start

@ start C:\Users\zf711lx\testBot webpack-dev-server --env.webchat

clean-webpack-plugin: C:\Users\zf711lx\testBot\dist has been removed. i 「wds」: Project is running at http://localhost:8080/ i 「wds」: webpack output is served from / i 「wds」: Content not from webpack is served from C:\Users\zf711lx\testBot\dist i 「wds」: 404s will fallback to /index.html × 「wdm」: Hash: 13d39a5077d52182a1c2 Version: webpack 4.30.0 Child Hash: 13d39a5077d52182a1c2 Time: 5703ms Built at: 2019-05-13 13:27:26 Asset Size Chunks Chunk Names assets/1be9aa40831ebcdf169ca8e7cf545dc6.png 6.57 KiB [emitted] assets/316a5f15313468d346d9d510566041d2.jpg 149 KiB [emitted] assets/9925fa63faf33ae2d7b514216fe3de2c.jpg 203 KiB [emitted] index.html 1.45 KiB [emitted] webchat.botonic.js 5.59 MiB webviews [emitted] webviews Entrypoint webviews = webchat.botonic.js [0] multi (webpack)-dev-server/client?http://localhost (webpack)/hot/dev-server.js ./src/app.js 52 bytes {webviews} [built] [./node_modules/@botonic/react/src/index.js] 882 bytes {webviews} [built] [./node_modules/loglevel/lib/loglevel.js] 7.29 KiB {webviews} [built] [./node_modules/querystring-es3/index.js] 126 bytes {webviews} [built] [./node_modules/strip-ansi/index.js] 162 bytes {webviews} [built] [./node_modules/url/url.js] 22.3 KiB {webviews} [built] [./node_modules/webpack-dev-server/client/index.js?http://localhost] (webpack)-dev-server/client?http://localhost 8.26 KiB {webviews} [built] [./node_modules/webpack-dev-server/client/overlay.js] (webpack)-dev-server/client/overlay.js 3.59 KiB {webviews} [built] [./node_modules/webpack-dev-server/client/socket.js] (webpack)-dev-server/client/socket.js 1.05 KiB {webviews} [built] [./node_modules/webpack/hot sync ^.\/log$] (webpack)/hot sync nonrecursive ^.\/log$ 170 bytes {webviews} [built] [./node_modules/webpack/hot/dev-server.js] (webpack)/hot/dev-server.js 1.65 KiB {webviews} [built] [./node_modules/webpack/hot/emitter.js] (webpack)/hot/emitter.js 75 bytes {webviews} [built] [./node_modules/webpack/hot/log-apply-result.js] (webpack)/hot/log-apply-result.js 1.31 KiB {webviews} [built] [./node_modules/webpack/hot/log.js] (webpack)/hot/log.js 1.13 KiB {webviews} [built] [./src/app.js] 252 bytes {webviews} [built]