Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run build fails on linux #16

Closed
developer239 opened this issue Dec 28, 2016 · 5 comments
Closed

Run build fails on linux #16

developer239 opened this issue Dec 28, 2016 · 5 comments

Comments

@developer239
Copy link

developer239 commented Dec 28, 2016

I have windows 10. When I saw your scripts in package.json I decided to use bash on ubuntu on windows to install your starter kit. Everything was fine except for npm run build command. It works on windows but not on linux. :D ... Could you help explaining me why?

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'run', 'build' ]
2 info using npm@3.10.9
3 info using node@v6.9.2
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle apollo-fullstack-starter-kit@1.0.0~prebuild: apollo-fullstack-starter-kit@1.0.0
6 silly lifecycle apollo-fullstack-starter-kit@1.0.0~prebuild: no script for prebuild, continuing
7 info lifecycle apollo-fullstack-starter-kit@1.0.0~build: apollo-fullstack-starter-kit@1.0.0
8 verbose lifecycle apollo-fullstack-starter-kit@1.0.0~build: unsafe-perm in lifecycle true
9 verbose lifecycle apollo-fullstack-starter-kit@1.0.0~build: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/mnt/c/Projekty/apollo-fullstack-starter-kit-master/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
10 verbose lifecycle apollo-fullstack-starter-kit@1.0.0~build: CWD: /mnt/c/Projekty/apollo-fullstack-starter-kit-master
11 silly lifecycle apollo-fullstack-starter-kit@1.0.0~build: Args: [ '-c', 'babel-node tools/webpack.run build' ]
12 silly lifecycle apollo-fullstack-starter-kit@1.0.0~build: Returned: code: 1  signal: null
13 info lifecycle apollo-fullstack-starter-kit@1.0.0~build: Failed to exec build script
14 verbose stack Error: apollo-fullstack-starter-kit@1.0.0 build: `babel-node tools/webpack.run build`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:877:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid apollo-fullstack-starter-kit@1.0.0
16 verbose cwd /mnt/c/Projekty/apollo-fullstack-starter-kit-master
17 error Linux 3.4.0+
18 error argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
19 error node v6.9.2
20 error npm  v3.10.9
21 error code ELIFECYCLE
22 error apollo-fullstack-starter-kit@1.0.0 build: `babel-node tools/webpack.run build`
22 error Exit status 1
23 error Failed at the apollo-fullstack-starter-kit@1.0.0 build script 'babel-node tools/webpack.run build'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the apollo-fullstack-starter-kit package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     babel-node tools/webpack.run build
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs apollo-fullstack-starter-kit
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls apollo-fullstack-starter-kit
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

@developer239
Copy link
Author

Also I was not able to start the application on linux. I have built files. I have migrated and seeded the database. But when I run start I get sql select error telling me something about unexistent table.

@developer239
Copy link
Author

> apollo-fullstack-starter-kit@1.0.0 start C:\Projekty\apollo-fullstack-starter-kit-master
> node --harmony ./build/server

"createFragment" is deprecated and will be removed in version 0.6, please refer to the documentation for how to define fragments: http://dev.apollodata.com/react/fragments.html.
backend info API is now running on port 8080
Error: SQLITE_ERROR: no such table: count
backend error RENDERING ERROR: { Error
    at new ApolloError (C:\Projekty\apollo-fullstack-starter-kit-master\src\errors\ApolloError.ts:61:18)
    at C:\Projekty\apollo-fullstack-starter-kit-master\src\core\QueryManager.ts:367:31
    at C:\Projekty\apollo-fullstack-starter-kit-master\src\core\QueryManager.ts:1057:13
    at Array.forEach (native)
    at C:\Projekty\apollo-fullstack-starter-kit-master\src\core\QueryManager.ts:1052:19
    at C:\Projekty\apollo-fullstack-starter-kit-master\node_modules\lodash\_createBaseFor.js:17:11
    at baseForOwn (C:\Projekty\apollo-fullstack-starter-kit-master\node_modules\lodash\_baseForOwn.js:13:20)
    at forOwn (C:\Projekty\apollo-fullstack-starter-kit-master\node_modules\lodash\forOwn.js:33:20)
    at QueryManager.broadcastQueries (C:\Projekty\apollo-fullstack-starter-kit-master\src\core\QueryManager.ts:1047:5)
    at Array.<anonymous> (C:\Projekty\apollo-fullstack-starter-kit-master\src\core\QueryManager.ts:234:14)
    at dispatch (C:\Projekty\apollo-fullstack-starter-kit-master\node_modules\redux\lib\createStore.js:186:19)
    at C:\Projekty\apollo-fullstack-starter-kit-master\src\ApolloClient.ts:504:24
    at Object.dispatch (C:\Projekty\apollo-fullstack-starter-kit-master\src\store.ts:72:12)
    at C:\Projekty\apollo-fullstack-starter-kit-master\src\core\QueryManager.ts:952:22
    at process._tickCallback (internal/process/next_tick.js:103:7)
  graphQLErrors:
   [ { message: 'select * from "count" limit 1 - SQLITE_ERROR: no such table: count',
       locations: [ [Object] ] } ],
  networkError: null,
  message: 'GraphQL error: select * from "count" limit 1 - SQLITE_ERROR: no such table: count',
  extraInfo: undefined }
Error: SQLITE_ERROR: no such table: count
backend error RENDERING ERROR: { Error
    at new ApolloError (C:\Projekty\apollo-fullstack-starter-kit-master\src\errors\ApolloError.ts:61:18)
    at C:\Projekty\apollo-fullstack-starter-kit-master\src\core\QueryManager.ts:367:31
    at C:\Projekty\apollo-fullstack-starter-kit-master\src\core\QueryManager.ts:1057:13
    at Array.forEach (native)
    at C:\Projekty\apollo-fullstack-starter-kit-master\src\core\QueryManager.ts:1052:19
    at C:\Projekty\apollo-fullstack-starter-kit-master\node_modules\lodash\_createBaseFor.js:17:11
    at baseForOwn (C:\Projekty\apollo-fullstack-starter-kit-master\node_modules\lodash\_baseForOwn.js:13:20)
    at forOwn (C:\Projekty\apollo-fullstack-starter-kit-master\node_modules\lodash\forOwn.js:33:20)
    at QueryManager.broadcastQueries (C:\Projekty\apollo-fullstack-starter-kit-master\src\core\QueryManager.ts:1047:5)
    at Array.<anonymous> (C:\Projekty\apollo-fullstack-starter-kit-master\src\core\QueryManager.ts:234:14)
    at dispatch (C:\Projekty\apollo-fullstack-starter-kit-master\node_modules\redux\lib\createStore.js:186:19)
    at C:\Projekty\apollo-fullstack-starter-kit-master\src\ApolloClient.ts:504:24
    at Object.dispatch (C:\Projekty\apollo-fullstack-starter-kit-master\src\store.ts:72:12)
    at C:\Projekty\apollo-fullstack-starter-kit-master\src\core\QueryManager.ts:952:22
    at process._tickCallback (internal/process/next_tick.js:103:7)
  graphQLErrors:
   [ { message: 'select * from "count" limit 1 - SQLITE_ERROR: no such table: count',
       locations: [ [Object] ] } ],
  networkError: null,
  message: 'GraphQL error: select * from "count" limit 1 - SQLITE_ERROR: no such table: count',
  extraInfo: undefined }

@larixer
Copy link
Member

larixer commented Dec 28, 2016

You are running undocumented commands. Please either follow instruction exactly as provided in Readme or investigate things yourself, the application is not complex.

@larixer
Copy link
Member

larixer commented Dec 28, 2016

@developer239 The problem, you have in the first comment is difficult for me to diagnose, because there is no relevant information in the error message from npm. Please try to localize offending code yourself.

The problem in your 3rd comment with missing count table is because you run migrate in dev mode and you are running Node.js app in prod mode, hence it complains that count table is missing in ./prod-db.sqlite3.

Either start app in dev mode e.g. npm start or run seed and migrate in prod mode via npm i --prod - this will run postinstall script in prod mode which runs seed and migrate for prod database.

@larixer
Copy link
Member

larixer commented Jan 2, 2017

Closing because of inactivity. Please reopen when you will have the time to discuss this issue.

@larixer larixer closed this as completed Jan 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants