react-starter-kit icon indicating copy to clipboard operation
react-starter-kit copied to clipboard

Server terminated unexpectedly with code: 0 signal: null

Open TristanDongMaster opened this issue 8 years ago • 13 comments

I need general the static html for every rounter, but failed for "npm run render". the cmd throw the follow ERROR: throw new Error("Server terminated unexpectedly with code: ".concat(code, " signal: ").concat(signal)); ^ Error: Server terminated unexpectedly with code: 0 signal: null at ChildProcess. (/Users/tristan/workspace/github/react-starter-kit/tools/runServer.js:56:17) at Object.onceWrapper (events.js:255:19) at ChildProcess.emit (events.js:160:13) at Process.ChildProcess._handle.onexit (internal/child_process.js

I need help, hurry online!!!!!!!!!!!!!!

TristanDongMaster avatar Feb 05 '18 07:02 TristanDongMaster

I am sure others encountering the same issues, anybody can fix it?thanks!!!!!!!

TristanDongMaster avatar Feb 05 '18 07:02 TristanDongMaster

I try to succeed to run the cmd, but it always failed after upgrading the node version!!!!

TristanDongMaster avatar Feb 05 '18 07:02 TristanDongMaster

Could you show the whole output after node -v and yarn run build --release --static?

frenzzy avatar Feb 05 '18 14:02 frenzzy

Also if you upgrade node, try remove node_modules and install fresh. Also you should try fresh branch or at least provide commit id where you fork and even better you should tell us how to reproduce. After you do, you are welcome to reopen the issue

langpavel avatar Feb 06 '18 04:02 langpavel

node -v -> v9.4.0 yarn run build --release --static ->
Asset Size Chunks Chunk Names chunks/privacy.js 29.9 kB 0 [emitted] privacy chunks/about.js 29.9 kB 1 [emitted] about chunks/register.js 21.7 kB 2 [emitted] register chunks/not-found.js 21.9 kB 3 [emitted] not-found chunks/login.js 55.3 kB 4 [emitted] login chunks/contact.js 21.6 kB 5 [emitted] contact chunks/admin.js 21.7 kB 6 [emitted] admin server.js 389 kB 7 [emitted] [big] server

but it do NOT generate the HTML, so I still need 'npm run render'

TristanDongMaster avatar Feb 06 '18 08:02 TristanDongMaster

i try to re-git-clone the react-starter-kit, it is the latest and fresh react-starter-kit, it is my ENV node -v -> v9.4.0

TristanDongMaster avatar Feb 06 '18 08:02 TristanDongMaster

I want to execute 'npm run render', but it always failed

TristanDongMaster avatar Feb 06 '18 08:02 TristanDongMaster

langpavel@lang:~/Projects/work/kriasoft/rsk (master)$ git clear
Sure? - This command may delete files that cannot be recovered, including those in .gitignore [y/N]
y
HEAD is now at c3f0c85 CSS modules: Allow :local pseudo selector (#1188)
langpavel@lang:~/Projects/work/kriasoft/rsk (master)$ yarn 
yarn install v1.3.2
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning " > [email protected]" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0".
[5/5] Building fresh packages...
Done in 33.65s.
langpavel@lang:~/Projects/work/kriasoft/rsk (master)$ yarn run build --release --static
yarn run v1.3.2
$ babel-node tools/run build --release --static
[15:36:28] Starting 'build'...
[15:36:28] Starting 'clean'...
[15:36:28] Finished 'clean' after 73 ms
[15:36:28] Starting 'copy'...
[15:36:28] Finished 'copy' after 28 ms
[15:36:28] Starting 'bundle'...
Child client:
    Time: 16966ms
                              Asset     Size  Chunks             Chunk Names
                 vendor.7e5c5d7b.js   242 kB       8  [emitted]  vendor
                       2f751285.png  2.83 kB          [emitted]  
          privacy.2311692b.chunk.js  6.03 kB       0  [emitted]  privacy
            about.4c344a83.chunk.js  6.04 kB       1  [emitted]  about
         register.ebd52904.chunk.js  3.02 kB       2  [emitted]  register
        not-found.38920b34.chunk.js  3.07 kB       3  [emitted]  not-found
            login.51ad0ad4.chunk.js  8.06 kB       4  [emitted]  login
          contact.177df805.chunk.js     3 kB       5  [emitted]  contact
            admin.b8eeb370.chunk.js  3.02 kB       6  [emitted]  admin
                 client.1960c730.js  29.2 kB       7  [emitted]  client
                       8844262b.png  6.81 kB          [emitted]  
      privacy.2311692b.chunk.js.map  25.7 kB       0  [emitted]  privacy
        about.4c344a83.chunk.js.map  25.7 kB       1  [emitted]  about
     register.ebd52904.chunk.js.map  17.4 kB       2  [emitted]  register
    not-found.38920b34.chunk.js.map  17.6 kB       3  [emitted]  not-found
        login.51ad0ad4.chunk.js.map  32.2 kB       4  [emitted]  login
      contact.177df805.chunk.js.map  17.3 kB       5  [emitted]  contact
        admin.b8eeb370.chunk.js.map  17.4 kB       6  [emitted]  admin
             client.1960c730.js.map   157 kB       7  [emitted]  client
             vendor.7e5c5d7b.js.map  1.48 MB       8  [emitted]  vendor
Child server:
    Time: 9665ms
                      Asset     Size  Chunks             Chunk Names
      chunks/privacy.js.map  8.74 kB       0  [emitted]  privacy
          chunks/privacy.js  12.4 kB       0  [emitted]  privacy
         chunks/register.js  9.06 kB       2  [emitted]  register
        chunks/not-found.js  9.12 kB       3  [emitted]  not-found
            chunks/login.js  15.9 kB       4  [emitted]  login
          chunks/contact.js  9.03 kB       5  [emitted]  contact
            chunks/admin.js  9.07 kB       6  [emitted]  admin
                  server.js   143 kB       7  [emitted]  server
            chunks/about.js  12.4 kB       1  [emitted]  about
        chunks/about.js.map  8.73 kB       1  [emitted]  about
     chunks/register.js.map   5.3 kB       2  [emitted]  register
    chunks/not-found.js.map  5.39 kB       3  [emitted]  not-found
        chunks/login.js.map  14.2 kB       4  [emitted]  login
      chunks/contact.js.map  5.26 kB       5  [emitted]  contact
        chunks/admin.js.map   5.4 kB       6  [emitted]  admin
              server.js.map   118 kB       7  [emitted]  server
[15:36:46] Finished 'bundle' after 17091 ms
[15:36:46] Starting 'render'...
Tue, 06 Feb 2018 14:36:47 GMT sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators at node_modules/sequelize/lib/sequelize.js:236:13
[15:36:47] Executing (default): CREATE TABLE IF NOT EXISTS `User` (`id` UUID PRIMARY KEY, `email` VARCHAR(255), `emailConfirmed` TINYINT(1) DEFAULT 0, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL);
[15:36:47] Executing (default): PRAGMA INDEX_LIST(`User`)
[15:36:47] Executing (default): PRAGMA INDEX_INFO(`sqlite_autoindex_User_1`)
[15:36:47] Executing (default): CREATE INDEX `user_email` ON `User` (`email`)
[15:36:47] Executing (default): CREATE TABLE IF NOT EXISTS `UserLogin` (`name` VARCHAR(50) NOT NULL, `key` VARCHAR(100) NOT NULL, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, `userId` UUID REFERENCES `User` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, PRIMARY KEY (`name`, `key`));
[15:36:47] Executing (default): PRAGMA INDEX_LIST(`UserLogin`)
[15:36:47] Executing (default): PRAGMA INDEX_INFO(`sqlite_autoindex_UserLogin_1`)
[15:36:47] Executing (default): CREATE TABLE IF NOT EXISTS `UserClaim` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `type` VARCHAR(255), `value` VARCHAR(255), `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, `userId` UUID REFERENCES `User` (`id`) ON DELETE CASCADE ON UPDATE CASCADE);
[15:36:47] Executing (default): PRAGMA INDEX_LIST(`UserClaim`)
[15:36:47] Executing (default): CREATE TABLE IF NOT EXISTS `UserProfile` (`userId` UUID PRIMARY KEY REFERENCES `User` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, `displayName` VARCHAR(100), `picture` VARCHAR(255), `gender` VARCHAR(50), `location` VARCHAR(100), `website` VARCHAR(255), `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL);
[15:36:47] Executing (default): PRAGMA INDEX_LIST(`UserProfile`)
[15:36:47] Executing (default): PRAGMA INDEX_INFO(`sqlite_autoindex_UserProfile_1`)
[15:36:47] The server is running at http://localhost:3000/
#2 build/public/contact.html => 200 OK (112 ms)
#3 build/public/login.html => 200 OK (124 ms)
#4 build/public/register.html => 200 OK (131 ms)
#5 build/public/about.html => 200 OK (137 ms)
#6 build/public/privacy.html => 200 OK (144 ms)
#7 build/public/404.html => 404 Not Found (155 ms)
#1 build/public/index.html => 200 OK (513 ms)
[15:36:48] Finished 'render' after 1989 ms
[15:36:48] Finished 'build' after 19186 ms
Done in 22.32s.
langpavel@lang:~/Projects/work/kriasoft/rsk (master)$ l build/public/
total 276K
-rw-r--r-- 1 langpavel langpavel 7.0K 2018-02-06 15:36 404.html
-rw-r--r-- 1 langpavel langpavel 9.7K 2018-02-06 15:36 about.html
drwxr-xr-x 1 langpavel langpavel  952 2018-02-06 15:36 assets
-rw-r--r-- 1 langpavel langpavel  416 2018-02-06 15:36 browserconfig.xml
-rw-r--r-- 1 langpavel langpavel 7.0K 2018-02-06 15:36 contact.html
-rw-r--r-- 1 langpavel langpavel  611 2018-02-06 15:36 crossdomain.xml
-rw-r--r-- 1 langpavel langpavel  766 2018-02-06 15:36 favicon.ico
-rw-r--r-- 1 langpavel langpavel  224 2018-02-06 15:36 humans.txt
-rw-r--r-- 1 langpavel langpavel 3.1K 2018-02-06 15:36 icon.png
-rw-r--r-- 1 langpavel langpavel 165K 2018-02-06 15:36 index.html
-rw-r--r-- 1 langpavel langpavel  12K 2018-02-06 15:36 login.html
-rw-r--r-- 1 langpavel langpavel 9.7K 2018-02-06 15:36 privacy.html
-rw-r--r-- 1 langpavel langpavel 7.0K 2018-02-06 15:36 register.html
-rw-r--r-- 1 langpavel langpavel   78 2018-02-06 15:36 robots.txt
-rw-r--r-- 1 langpavel langpavel  130 2018-02-06 15:36 site.webmanifest
-rw-r--r-- 1 langpavel langpavel 9.7K 2018-02-06 15:36 tile.png
-rw-r--r-- 1 langpavel langpavel 4.8K 2018-02-06 15:36 tile-wide.png
langpavel@lang:~/Projects/work/kriasoft/rsk (master)$ 

langpavel avatar Feb 06 '18 14:02 langpavel

found the issues, when you must run 'npm run buidld' before 'npm run render', it block my project, now it is fixed,Thanks!!!!!

TristanDongMaster avatar Feb 07 '18 02:02 TristanDongMaster

yarn run build -- --release --static

TristanDongMaster avatar Feb 07 '18 02:02 TristanDongMaster

yarn build --release --static is sufficient. You are welcome, but please, keep in mind that we run this project from our free time and you should look inside package.json what is possible and try that

langpavel avatar Feb 07 '18 02:02 langpavel

Still not working after run this command yarn build --release --static. Also tried with clean node_module

I am getting following error

D:\wamp\www\react-kit\tools\runServer.js:68
          throw new Error("Server terminated unexpectedly with code: ".concat(co
de, " signal: ").concat(signal));
          ^

Error: Server terminated unexpectedly with code: 0 signal: null
    at ChildProcess.<anonymous> (D:\wamp\www\react-kit\tools/runServer.js
:56:17)
    at Object.onceWrapper (events.js:317:30)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this comm
and.

nisargrthakkar avatar Jul 18 '18 11:07 nisargrthakkar

same, still not working after run this commond yarn run build -- --release --static

yarn run build -- --release --static
yarn run v1.5.1
warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts.
$ babel-node tools/run build --release --static
[18:25:25] Starting 'build'...
[18:25:25] Starting 'clean'...
[18:25:25] Finished 'clean' after 64 ms
[18:25:25] Starting 'copy'...
[18:25:25] Finished 'copy' after 14 ms
[18:25:25] Starting 'bundle'...
Child client:
    Time: 9512ms
    Built at: 2018-10-10 18:25:35
                              Asset       Size  Chunks                    Chunk Names
                 client.2e67858e.js     22 KiB       5  [emitted]         client
                       8844262b.png   6.65 KiB          [emitted]
        not-found.a56bef27.chunk.js   3.35 KiB       0  [emitted]         not-found
            about.9534eb0d.chunk.js   6.16 KiB       1  [emitted]         about
          contact.1fb93c09.chunk.js   3.28 KiB       2  [emitted]         contact
             home.ac0ff0e4.chunk.js     16 KiB       3  [emitted]         home
          vendors.a81e6c37.chunk.js    266 KiB       4  [emitted]  [big]  vendors
                       2f751285.png   2.77 KiB          [emitted]
    not-found.a56bef27.chunk.js.map   4.93 KiB       0  [emitted]         not-found
        about.9534eb0d.chunk.js.map   8.13 KiB       1  [emitted]         about
      contact.1fb93c09.chunk.js.map   4.81 KiB       2  [emitted]         contact
         home.ac0ff0e4.chunk.js.map   30.4 KiB       3  [emitted]         home
      vendors.a81e6c37.chunk.js.map    958 KiB       4  [emitted]         vendors
             client.2e67858e.js.map   67.8 KiB       5  [emitted]         client
          ../../asset-manifest.json  397 bytes          [emitted]
    Entrypoint client [big] = vendors.a81e6c37.chunk.js vendors.a81e6c37.chunk.js.map client.2e67858e.js client.2e67858e.js.map

    WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
    This can impact web performance.
    Assets:
      vendors.a81e6c37.chunk.js (266 KiB)

    WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
    Entrypoints:
      client (288 KiB)
          vendors.a81e6c37.chunk.js
          client.2e67858e.js

Child server:
    Time: 7802ms
    Built at: 2018-10-10 18:25:33
                      Asset      Size  Chunks             Chunk Names
        chunks/not-found.js  3.33 KiB       0  [emitted]  not-found
            chunks/about.js  6.15 KiB       1  [emitted]  about
          chunks/contact.js  3.27 KiB       2  [emitted]  contact
             chunks/home.js  14.2 KiB       3  [emitted]  home
                  server.js    32 KiB       4  [emitted]  server
    chunks/not-found.js.map  4.93 KiB       0  [emitted]  not-found
        chunks/about.js.map  8.13 KiB       1  [emitted]  about
      chunks/contact.js.map  4.81 KiB       2  [emitted]  contact
         chunks/home.js.map  20.9 KiB       3  [emitted]  home
              server.js.map  86.8 KiB       4  [emitted]  server
    Entrypoint server = server.js server.js.map
[18:25:35] Finished 'bundle' after 9952 ms
[18:25:35] Starting 'render'...
/Users/mac/ydwork/ssrReactKit/tools/runServer.js:68
          throw new Error("Server terminated unexpectedly with code: ".concat(code, " signal: ").concat(signal));
          ^

Error: Server terminated unexpectedly with code: 0 signal: null
    at ChildProcess.<anonymous> (/Users/mac/ydwork/ssrReactKit/tools/runServer.js:56:17)
    at Object.onceWrapper (events.js:317:30)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
error An unexpected error occurred: "Command failed.
Exit code: 1
Command: sh
Arguments: -c babel-node tools/run build --release --static
Directory: /Users/mac/ydwork/ssrReactKit
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/Users/mac/ydwork/ssrReactKit/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Topppy avatar Oct 10 '18 10:10 Topppy