DylanAllen / noiiice

a serverless blog built on NuxtJS, AWS, serverless framework, and irrational exuberance.
https://noiiice.com
MIT License
45 stars 7 forks source link

Cannot run the app locally #5

Closed airpaio closed 4 years ago

airpaio commented 4 years ago

Another issue I'm facing is that when running npm run dev

nodejs always returns a Microsoft JScript compilation Syntax error. See logs below.

Note that I am running this against your cloned repo with no changes other than runnin npm install. The only way I have been able to successfully run npm run dev is if I create a new Nuxt app and then move files from your repo into my newly created Nuxt app, but even in this case, the webpages do not properly render.

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\crobi\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'dev' ]
2 info using npm@6.11.3
3 info using node@v10.16.3
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle noiiice@1.0.0~predev: noiiice@1.0.0
6 info lifecycle noiiice@1.0.0~dev: noiiice@1.0.0
7 verbose lifecycle noiiice@1.0.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle noiiice@1.0.0~dev: PATH: C:\Users\crobi\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;E:\airpa\noiiice\node_modules\.bin;C:\Users\crobi\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\crobi\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;E:\msys64\mingw64\bin;E:\msys64\mingw32\bin;E:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\libnvvp;C:\Program Files\Microsoft MPI\Bin;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Git\cmd;E:\Go\bin;E:\Qt\Tools\mingw530_32\bin;C:\Program Files\CMake\bin;E:\opencv\build\install\x64\mingw\bin;E:\Tesseract-OCR;C:\Program Files\Glyph & Cog\XpdfReader-win64\xpdf-tools-win-4.00\bin64;C:\WINDOWS\System32\OpenSSH;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\PDFtk\bin;E:\Amazon\AWSCLI\bin;C:\Program Files\nodejs;C:\Users\crobi\AppData\Local\Microsoft\WindowsApps;C:\Users\crobi\Anaconda3;C:\Users\crobi\Anaconda3\Scripts;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin;C:\Users\crobi\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin;E:\MongoDB\bin;C:\Users\crobi\AppData\Local\atom\bin;C:\Users\crobi\AppData\Local\Microsoft\WindowsApps;C:\Users\crobi\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle noiiice@1.0.0~dev: CWD: E:\airpa\noiiice
10 silly lifecycle noiiice@1.0.0~dev: Args: [ '/d /s /c', 'nuxt' ]
11 silly lifecycle noiiice@1.0.0~dev: Returned: code: 1  signal: null
12 info lifecycle noiiice@1.0.0~dev: Failed to exec dev script
13 verbose stack Error: noiiice@1.0.0 dev: `nuxt`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\crobi\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:198:13)
13 verbose stack     at ChildProcess.<anonymous> (C:\Users\crobi\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:198:13)
13 verbose stack     at maybeClose (internal/child_process.js:982:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid noiiice@1.0.0
15 verbose cwd E:\airpa\noiiice
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\crobi\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
18 verbose node v10.16.3
19 verbose npm  v6.11.3
20 error code ELIFECYCLE
21 error errno 1
22 error noiiice@1.0.0 dev: `nuxt`
22 error Exit status 1
23 error Failed at the noiiice@1.0.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
DylanAllen commented 4 years ago

Try navigating into the apps/app folder and running npm install then navigate back down to the root and try npm run dev again.

airpaio commented 4 years ago

I've tried this but no luck. It keeps throwing the "Microsoft JScript compilation Syntax error" on the nuxt.js file.

At one time I tried putting ; on the line endings in apps/app/nuxt.js but that didn't help either.

DylanAllen commented 4 years ago

There was a file name conflict that only Windows seems to have. I had to rename the nuxt.js file and references to it, and then npm run dev started working on my PC.

Pull down the update and try again.

airpaio commented 4 years ago

Got it working now! Thanks! However your Install Post still mentions to navigate to apps/app/ to run npm run dev. Mine still throws the error there, but running from the root noiiice/ directory is working fine. I suppose you could close this now if that's the expecxted behavior.

DylanAllen commented 4 years ago

I just updated the README and that post to exclude the navigation step. Running npm run dev from the root directory is how that is supposed to work. Thank you for reporting that!