question

carterericam_194048 avatar image
carterericam_194048 asked carterericam_194048 commented

Getting error running "npm run start" for week 4 Python coding

I am working on the homework for Wk 4 with python coding. I got this error on the command line in Gitpod after running npm run start (entire log below)

22 error getting-started-with-apollo-ui@1.0.0 start: `cross-env NODE_ENV=development webpack-dev-server -d`
22 error Exit status 1
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/home/gitpod/.nvm/versions/node/v12.18.3/bin/node',
1 verbose cli '/home/gitpod/.nvm/versions/node/v12.18.3/bin/npm',
1 verbose cli 'run',
1 verbose cli 'start'
1 verbose cli ]
2 info using npm@6.14.7
3 info using node@v12.18.3
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle getting-started-with-apollo-ui@1.0.0~prestart: getting-started-with-apollo-ui@1.0.0
6 info lifecycle getting-started-with-apollo-ui@1.0.0~start: getting-started-with-apollo-ui@1.0.0
7 verbose lifecycle getting-started-with-apollo-ui@1.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle getting-started-with-apollo-ui@1.0.0~start: PATH: /home/gitpod/.nvm/versions/node/v12.18.3/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/workspace/cassandra-workshop-series/week4-AppDev-api/getting-started-with-astra-ui/node_modules/.bin:/home/gitpod/.nvm/versions/node/v12.18.3/bin:/home/gitpod/.cargo/bin:/home/gitpod/.pyenv/plugins/pyenv-virtualenv/shims:/home/gitpod/.pyenv/shims:/workspace/.cargo/bin:/workspace/.pip-modules/bin:/workspace/.rvm/bin:/home/gitpod/.cargo/bin:/home/gitpod/.sdkman/candidates/maven/current/bin:/home/gitpod/.sdkman/candidates/java/current/bin:/home/gitpod/.sdkman/candidates/gradle/current/bin:/home/gitpod/.cargo/bin:/home/gitpod/.rvm/gems/ruby-2.6.6/bin:/home/gitpod/.rvm/gems/ruby-2.6.6@global/bin:/home/gitpod/.rvm/rubies/ruby-2.6.6/bin:/home/gitpod/.pyenv/plugins/pyenv-virtualenv/shims:/home/gitpod/.pyenv/shims:/workspace/.cargo/bin:/workspace/.pip-modules/bin:/workspace/.rvm/bin:/home/gitpod/.pyenv/bin:/home/gitpod/.pyenv/shims:/workspace/go/bin:/home/gitpod/go/bin:/home/gitpod/go-packages/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin/:/home/gitpod/.nvm/versions/node/v12.18.3/bin:/home/gitpod/.rvm/bin:/home/gitpod/.rvm/bin:/home/gitpod/.rvm/bin
9 verbose lifecycle getting-started-with-apollo-ui@1.0.0~start: CWD: /workspace/cassandra-workshop-series/week4-AppDev-api/getting-started-with-astra-ui
10 silly lifecycle getting-started-with-apollo-ui@1.0.0~start: Args: [ '-c', 'cross-env NODE_ENV=development webpack-dev-server -d' ]
11 silly lifecycle getting-started-with-apollo-ui@1.0.0~start: Returned: code: 1 signal: null
12 info lifecycle getting-started-with-apollo-ui@1.0.0~start: Failed to exec start script
13 verbose stack Error: getting-started-with-apollo-ui@1.0.0 start: `cross-env NODE_ENV=development webpack-dev-server -d`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/home/gitpod/.nvm/versions/node/v12.18.3/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess.<anonymous> (/home/gitpod/.nvm/versions/node/v12.18.3/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid getting-started-with-apollo-ui@1.0.0
15 verbose cwd /workspace/cassandra-workshop-series/week4-AppDev-api/getting-started-with-astra-ui
16 verbose Linux 4.14.138+
17 verbose argv "/home/gitpod/.nvm/versions/node/v12.18.3/bin/node" "/home/gitpod/.nvm/versions/node/v12.18.3/bin/npm" "run" "start"
18 verbose node v12.18.3
19 verbose npm v6.14.7
20 error code ELIFECYCLE
21 error errno 1
22 error getting-started-with-apollo-ui@1.0.0 start: `cross-env NODE_ENV=development webpack-dev-server -d`
22 error Exit status 1
23 error Failed at the getting-started-with-apollo-ui@1.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
workshop
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

bettina.swynnerton avatar image
bettina.swynnerton answered carterericam_194048 commented

Hi @carterericam_194048,

I can reproduce this error if I do not create the environment variable for BASE_ADDRESS.

A .env file is required before you can build the application. This file needs to be added to the root of the project and called .env. This file contains all the environment variables required for the application. Currently the only environment variable that needs to be set is BASE_ADDRESS.

Note that gitpod does not autosave by default, so make sure that the file is saved before you build the UI.

If you are working with the Python backend, see step 4 here:

https://community.datastax.com/questions/6796/how-to-upload-the-secure-connection-bundle-via-ui-1.html

I hope this helps!

2 comments Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

carterericam_194048 avatar image carterericam_194048 commented ·

Thanks Bettina. i got the error after I created an .env file and added the BASE ADDRESS code and then placed the file in the solution explorer root for week4 in Gitpod. So, I went back to the class recording. He created the file directly on the command line, so I did the same thing....success.


0 Likes 0 ·
bettina.swynnerton avatar image bettina.swynnerton ♦♦ carterericam_194048 commented ·

perfect, glad it is working now!


0 Likes 0 ·