ctrlplusb / react-universally

A starter kit for universal react applications.
MIT License
1.69k stars 243 forks source link

deploy script issue/ build on Now #445

Closed saniko closed 7 years ago

saniko commented 7 years ago

Hi, Tried the deploy script to now. yarn run deploy.

Getting "Authentication" errors.

I have installed the latest cli.

birkir commented 7 years ago

Please post the full error message. But the only thing react-universally does is running the command now. So I guess you are not authenticated to now.

saniko commented 7 years ago

Did not use windows power shell... All is OK.

saniko commented 7 years ago

Reopening this, I'm not sure if it's now.js problem or not. After many tries with my code, i have decided to try clean clone.

▲ npm run build
> react-universally@13.0.0 build /home/nowuser/src
> babel-node internal/scripts/build --optimize
==> Creating an optimised bundle configuration for the "client"
==> Creating an optimised bundle configuration for the "server"
Hash: 6ad607d71df39ca85a25
Version: webpack 2.4.1
Time: 24677ms
                                         Asset       Size  Chunks             Chunk Names
          93a2b06556deb55b214bb0cfbce8a4e0.png     9.3 kB          [emitted]
                  main-5b43796444c92121fb1f.js    1.52 kB       0  [emitted]  main
                 index-834989b019253235abad.js     229 kB       1  [emitted]  index
    index-912870e11cce18589e63fd66c49e15e7.css    2.34 kB       1  [emitted]  index
index-912870e11cce18589e63fd66c49e15e7.css.map  119 bytes       1  [emitted]  index
                                  offline.html  696 bytes          [emitted]
                                         sw.js    10.1 kB          [emitted]
chunk    {0} main-5b43796444c92121fb1f.js (main) 1.46 kB {1} [rendered]
  [237] ./shared/components/DemoApp/AsyncAboutRoute/AboutRoute.js 729 bytes {0} [built] [failed] [1 error]
  [238] ./shared/components/DemoApp/AsyncHomeRoute/HomeRoute.js 729 bytes {0} [built] [failed] [1 error]
chunk    {1} index-834989b019253235abad.js, index-912870e11cce18589e63fd66c49e15e7.css, index-912870e11cce18589e63fd66
9e15e7.css.map (index) 903 kB [entry] [rendered]
    [4] ./~/react/react.js 56 bytes {1} [built]
   [34] ./~/node-libs-browser/~/process/browser.js 5.3 kB {1} [built]
   [35] ./~/react-async-component/commonjs/index.js 851 bytes {1} [built]
   [90] ./client/index.js 3.86 kB {1} [built]
   [91] ./~/regenerator-runtime/runtime.js 23.8 kB {1} [built]
  [111] ./client/components/ReactHotLoader.js 703 bytes {1} [built]
  [112] ./client/polyfills/index.js 787 bytes {1} [built]
  [113] ./client/registerServiceWorker.js 1.69 kB {1} [built]
  [121] ./shared/components/DemoApp/index.js 6.43 kB {1} [built]
  [136] ./~/react-async-bootstrapper/commonjs/index.js 640 bytes {1} [built]
  [138] ./~/react-async-component/commonjs/asyncComponent.js 10.3 kB {1} [built]
  [139] ./~/react-dom/index.js 59 bytes {1} [built]
  [205] ./~/react-router-dom/BrowserRouter.js 2.57 kB {1} [built]
  [235] (webpack)/buildin/global.js 509 bytes {1} [built]
  [236] multi regenerator-runtime/runtime ./client/index.js 40 bytes {1} [built]
     + 222 hidden modules
ERROR in ./shared/components/DemoApp/Error404/index.js
Module build failed: Error: channel closed
    at ChildProcess.target.send (internal/child_process.js:549:16)
    at Object.compile (/home/nowuser/src/node_modules/happypack/lib/HappyThread.js:138:10)
    at Object.compile (/home/nowuser/src/node_modules/happypack/lib/HappyThreadPool.js:72:14)
    at HappyPlugin.compileAndUpdateCache (/home/nowuser/src/node_modules/happypack/lib/HappyPlugin.js:344:14)
    at HappyPlugin.compileInBackground (/home/nowuser/src/node_modules/happypack/lib/HappyPlugin.js:315:25)
    at HappyPlugin.compile (/home/nowuser/src/node_modules/happypack/lib/HappyPlugin.js:240:32)
    at Object.HappyLoader (/home/nowuser/src/node_modules/happypack/lib/HappyLoader.js:42:15)
 @ ./shared/components/DemoApp/index.js 33:13-34
 @ ./client/index.js
 @ multi regenerator-runtime/runtime ./client/index.js
ERROR in ./shared/components/DemoApp/AsyncCounterRoute/index.js
Module build failed: Error: channel closed
    at ChildProcess.target.send (internal/child_process.js:549:16)
    at Object.compile (/home/nowuser/src/node_modules/happypack/lib/HappyThread.js:138:10)
    at Object.compile (/home/nowuser/src/node_modules/happypack/lib/HappyThreadPool.js:72:14)
    at HappyPlugin.compileAndUpdateCache (/home/nowuser/src/node_modules/happypack/lib/HappyPlugin.js:344:14)
    at HappyPlugin.compileInBackground (/home/nowuser/src/node_modules/happypack/lib/HappyPlugin.js:315:25)
    at HappyPlugin.compile (/home/nowuser/src/node_modules/happypack/lib/HappyPlugin.js:240:32)
    at Object.HappyLoader (/home/nowuser/src/node_modules/happypack/lib/HappyLoader.js:42:15)
 @ ./shared/components/DemoApp/index.js 45:25-55
 @ ./client/index.js
 @ multi regenerator-runtime/runtime ./client/index.js
ERROR in ./shared/components/DemoApp/AsyncHomeRoute/HomeRoute.js
Module build failed: Error: channel closed
    at ChildProcess.target.send (internal/child_process.js:549:16)
    at Object.compile (/home/nowuser/src/node_modules/happypack/lib/HappyThread.js:138:10)
    at Object.compile (/home/nowuser/src/node_modules/happypack/lib/HappyThreadPool.js:72:14)
    at HappyPlugin.compileAndUpdateCache (/home/nowuser/src/node_modules/happypack/lib/HappyPlugin.js:344:14)
    at HappyPlugin.compileInBackground (/home/nowuser/src/node_modules/happypack/lib/HappyPlugin.js:315:25)
    at HappyPlugin.compile (/home/nowuser/src/node_modules/happypack/lib/HappyPlugin.js:240:32)
    at Object.HappyLoader (/home/nowuser/src/node_modules/happypack/lib/HappyLoader.js:42:15)
 @ ./shared/components/DemoApp/AsyncHomeRoute/index.js 12:11-70
 @ ./shared/components/DemoApp/index.js
 @ ./client/index.js
 @ multi regenerator-runtime/runtime ./client/index.js
ERROR in ./shared/components/DemoApp/AsyncAboutRoute/AboutRoute.js
Module build failed: Error: channel closed
    at ChildProcess.target.send (internal/child_process.js:549:16)
    at Object.compile (/home/nowuser/src/node_modules/happypack/lib/HappyThread.js:138:10)
    at Object.compile (/home/nowuser/src/node_modules/happypack/lib/HappyThreadPool.js:72:14)
    at HappyPlugin.compileAndUpdateCache (/home/nowuser/src/node_modules/happypack/lib/HappyPlugin.js:344:14)
    at HappyPlugin.compileInBackground (/home/nowuser/src/node_modules/happypack/lib/HappyPlugin.js:315:25)
    at HappyPlugin.compile (/home/nowuser/src/node_modules/happypack/lib/HappyPlugin.js:240:32)
    at Object.HappyLoader (/home/nowuser/src/node_modules/happypack/lib/HappyLoader.js:42:15)
 @ ./shared/components/DemoApp/AsyncAboutRoute/index.js 12:11-71
 @ ./shared/components/DemoApp/index.js
 @ ./client/index.js
 @ multi regenerator-runtime/runtime ./client/index.js
Child __offline_serviceworker:
                      Asset     Size  Chunks  Chunk Names
    __offline_serviceworker  7.38 kB       0  __offline_serviceworker
    chunk    {0} __offline_serviceworker (__offline_serviceworker) 17.5 kB [entry] [rendered]
        [0] ./~/offline-plugin/empty-entry.js 0 bytes {0} [built]
        [1] ./~/offline-plugin/lib/misc/sw-loader.js?json=%7B%22data_var_name%22%3A%22__wpo%22%2C%22loaders%22%3A%5B%5
2C%22cacheMaps%22%3A%5B%5D%7D!./~/offline-plugin/empty-entry.js 17.5 kB {0} [built]
Child html-webpack-plugin for "offline.html":
           Asset    Size  Chunks  Chunk Names
    offline.html  653 kB       0
    chunk    {0} offline.html 649 kB [entry] [rendered]
        [1] ./~/fbjs/lib/warning.js 2.1 kB {0} [built]
        [3] ./~/object-assign/index.js 2.11 kB {0} [built]
       [12] ./~/react/lib/React.js 3.32 kB {0} [built]
       [43] ./~/react/lib/ReactComponent.js 4.61 kB {0} [built]
       [45] ./~/react/react.js 56 bytes {0} [built]
       [74] ./shared/components/HTML/index.js 2.29 kB {0} [built]
       [75] ./~/react-dom/server.js 65 bytes {0} [built]
       [76] ./~/babel-loader/lib!./internal/webpack/withServiceWorker/offlinePageTemplate.js 1.06 kB {0} [built]
       [92] ./~/prop-types/index.js 1.08 kB {0} [built]
      [114] ./~/react-dom/lib/ReactDOMServer.js 735 bytes {0} [built]
      [118] ./~/react-dom/lib/ReactDefaultInjection.js 3.5 kB {0} [built]
      [158] ./~/react/lib/ReactChildren.js 6.19 kB {0} [built]
      [159] ./~/react/lib/ReactClass.js 26.9 kB {0} [built]
      [160] ./~/react/lib/ReactDOMFactories.js 5.53 kB {0} [built]
      [167] ./~/react/lib/onlyChild.js 1.34 kB {0} [built]
         + 154 hidden modules
Child extract-text-webpack-plugin:
    chunk    {0} extract-text-webpack-plugin-output-filename 57.3 kB [entry] [rendered]
        [0] ./~/css-loader/lib/css-base.js 2.19 kB {0} [built]
        [1] ./~/base64-js/index.js 3.48 kB {0} [built]
        [2] ./~/buffer/index.js 48.6 kB {0} [built]
        [3] ./~/css-loader!./shared/components/DemoApp/globals.css 362 bytes {0} [built]
        [4] ./~/ieee754/index.js 2.05 kB {0} [built]
        [5] ./~/isarray/index.js 132 bytes {0} [built]
        [6] (webpack)/buildin/global.js 509 bytes {0} [built]
Child extract-text-webpack-plugin:
    chunk    {0} extract-text-webpack-plugin-output-filename 59.3 kB [entry] [rendered]
        [0] ./~/css-loader/lib/css-base.js 2.19 kB {0} [built]
        [1] ./~/base64-js/index.js 3.48 kB {0} [built]
        [2] ./~/buffer/index.js 48.6 kB {0} [built]
        [3] ./~/css-loader!./~/normalize.css/normalize.css 2.3 kB {0} [built]
        [4] ./~/ieee754/index.js 2.05 kB {0} [built]
        [5] ./~/isarray/index.js 132 bytes {0} [built]
        [6] (webpack)/buildin/global.js 509 bytes {0} [built]
saniko commented 7 years ago

Tried heroku as well, got this error:

remote: $ yarn run build remote: yarn run v0.23.4 remote: $ babel-node internal/scripts/build --optimize remote: sh: 1: babel-node: not found remote: error Command failed with exit code 127.

Any idea?

diondirza commented 7 years ago

you should set heroku environment for NPM_CONFIG_PRODUCTION to false

saniko commented 7 years ago

10X.