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

Getting error in the frontend code, when ran npm start after npm install. #74

Closed
reach2saurabh opened this issue Sep 18, 2019 · 6 comments

Comments

@reach2saurabh
Copy link

saurabh@BLRKEC140533L:/mnt/d/projects/molina/AzureSearch_JFK_Files-master/frontend$ npm start

jfk-files@1.0.0 start /mnt/d/projects/molina/AzureSearch_JFK_Files-master/frontend
env-cmd .env if-env NODE_ENV=production && npm run start:prod || npm run start:dev

jfk-files@1.0.0 start:dev /mnt/d/projects/molina/AzureSearch_JFK_Files-master/frontend
env-cmd .env cross-env NODE_ENV=development webpack-dev-server --config=webpack.dev.config.js

/mnt/d/projects/molina/AzureSearch_JFK_Files-master/frontend/node_modules/webpack/lib/webpack.js:189
throw new RemovedPluginError(errorMessage);
^

Error: webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead.
at Object.get [as CommonsChunkPlugin] (/mnt/d/projects/molina/AzureSearch_JFK_Files-master/frontend/node_modules/webpack/lib/webpack.js:189:10)
at Object. (/mnt/d/projects/molina/AzureSearch_JFK_Files-master/frontend/webpack.base.config.js:147:26)
at Module._compile (module.js:662:30)
at Object.Module._extensions..js (module.js:673:10)
at Module.load (module.js:575:32)
at tryModuleLoad (module.js:515:12)
at Function.Module._load (module.js:507:3)
at Module.require (module.js:606:17)
at require (internal/module.js:11:18)
at Object. (/mnt/d/projects/molina/AzureSearch_JFK_Files-master/frontend/webpack.dev.config.js:4:22)
at Module._compile (module.js:662:30)
at Object.Module._extensions..js (module.js:673:10)
at Module.load (module.js:575:32)
at tryModuleLoad (module.js:515:12)
at Function.Module._load (module.js:507:3)
at Module.require (module.js:606:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! jfk-files@1.0.0 start:dev: env-cmd .env cross-env NODE_ENV=development webpack-dev-server --config=webpack.dev.config.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the jfk-files@1.0.0 start:dev 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! /home/saurabh/.npm/_logs/2019-09-18T11_48_12_938Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! jfk-files@1.0.0 start: env-cmd .env if-env NODE_ENV=production && npm run start:prod || npm run start:dev
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the jfk-files@1.0.0 start 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! /home/saurabh/.npm/_logs/2019-09-18T11_48_13_101Z-debug.log

@mariotzki
Copy link

Still getting the issue: (after #93)

image

@mariotzki
Copy link

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Users\mavi\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'start:dev' ]
2 info using npm@6.0.1
3 info using node@v11.15.0
4 verbose run-script [ 'prestart:dev', 'start:dev', 'poststart:dev' ]
5 info lifecycle jfk-files@1.0.0prestart:dev: jfk-files@1.0.0
6 info lifecycle jfk-files@1.0.0
start:dev: jfk-files@1.0.0
7 verbose lifecycle jfk-files@1.0.0start:dev: unsafe-perm in lifecycle true
8 verbose lifecycle jfk-files@1.0.0
start:dev: PATH: C:\Users\mavi\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\mavi\source\github\AzureSearch_JFK_Files\frontend\node_modules.bin;C:\Python27;C:\Python27\Scripts;C:\Python38\Scripts;C:\Python38;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Program Files\Common Files\Microsoft Shared\Microsoft Online Services;C:\Program Files (x86)\Common Files\Microsoft Shared\Microsoft Online Services;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio;C:\Program Files\Git\cmd;C:\Program Files (x86)\LINQPad5;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\dotnet;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs;C:\Users\mavi\AppData\Local\Microsoft\WindowsApps;;C:\Program Files\Microsoft VS Code\bin;C:\Users\mavi\AppData\Local\Programs\Fiddler;C:\Users\mavi\AppData\Local\Microsoft\WindowsApps;C:\Users\mavi.dotnet\tools;C:\Users\mavi.dotnet\tools;C:\Users\mavi\AppData\Roaming\npm
9 verbose lifecycle jfk-files@1.0.0start:dev: CWD: C:\Users\mavi\source\github\AzureSearch_JFK_Files\frontend
10 silly lifecycle jfk-files@1.0.0
start:dev: Args: [ '/d /s /c',
10 silly lifecycle 'env-cmd .env cross-env NODE_ENV=development webpack-dev-server --config=webpack.dev.config.js' ]
11 silly lifecycle jfk-files@1.0.0start:dev: Returned: code: 4294967295 signal: null
12 info lifecycle jfk-files@1.0.0
start:dev: Failed to exec start:dev script
13 verbose stack Error: jfk-files@1.0.0 start:dev: env-cmd .env cross-env NODE_ENV=development webpack-dev-server --config=webpack.dev.config.js
13 verbose stack Exit status 4294967295
13 verbose stack at EventEmitter. (C:\Users\mavi\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:283:16)
13 verbose stack at EventEmitter.emit (events.js:193:13)
13 verbose stack at ChildProcess. (C:\Users\mavi\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:193:13)
13 verbose stack at maybeClose (internal/child_process.js:999:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:266:5)
14 verbose pkgid jfk-files@1.0.0
15 verbose cwd C:\Users\mavi\source\github\AzureSearch_JFK_Files\frontend
16 verbose Windows_NT 10.0.19041
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\mavi\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "start:dev"
18 verbose node v11.15.0
19 verbose npm v6.0.1
20 error code ELIFECYCLE
21 error errno 4294967295
22 error jfk-files@1.0.0 start:dev: env-cmd .env cross-env NODE_ENV=development webpack-dev-server --config=webpack.dev.config.js
22 error Exit status 4294967295
23 error Failed at the jfk-files@1.0.0 start:dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 4294967295, true ]

@Careyjmac
Copy link
Collaborator

It looks like you are trying to use a different command from the one in the docs, can you try the one described in the demo instructions?

cd frontend
npm install
npm run build:prod

The demo is meant to be deployed to a live azure websites instance, I honestly haven't tried to deploy it locally in quite some time so if that is your goal I'm not sure what the steps would be to resolve that.

@mariotzki
Copy link

mariotzki commented Jul 28, 2020

Thanks. Did that. Now, I'm not getting any network calls after clicking the button.
https://jfk-site-vfowxf4akopu6.azurewebsites.net/
image

@Careyjmac
Copy link
Collaborator

You also need to make sure the rest of the demo is set up and run correctly so that the .env file gets populated with the correct values. As discussed in #65 you may also need to reset the .env file to the original state before running the JfkInitializer so that the JfkInitializer can do the find and replace on the values that it needs to correctly.

I suggest you start from step 1 with a fresh clone of the repo and work your way through the demo completely, and if after following all the direction exactly as laid out if it still doesnt work please let me know which step failed and what error occurred.

@mariotzki
Copy link

I re-did the jfkinitializer and frontend steps, it fixed the problem. Thank you!

@chuwik chuwik closed this as completed Oct 14, 2020
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

4 participants