Skip to content

'npm run local' throws error after fresh clone and following guide #70

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

Closed
pathurs opened this issue Sep 13, 2017 · 13 comments
Closed

'npm run local' throws error after fresh clone and following guide #70

pathurs opened this issue Sep 13, 2017 · 13 comments

Comments

@pathurs
Copy link

pathurs commented Sep 13, 2017

I can probably figure this out myself, however I could not see any answers to this on the supplied wiki and guides.

(It's pretty late at night, so I'm not in the mood to fully debug)

I believe that tslint, webpack, etc are not command that the command line can run:

'tslint' is not recognised as an internal or external command, operable program or batch file.

Here is my npm-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ 'D:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'local' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prelocal', 'local', 'postlocal' ]
5 info lifecycle [email protected]~prelocal: [email protected]
6 silly lifecycle [email protected]~prelocal: no script for prelocal, continuing
7 info lifecycle [email protected]~local: [email protected]
8 verbose lifecycle [email protected]~local: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~local: PATH: D:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;D:\GitHub\screeps-typescript-starter\node_modules\.bin;C:\Program Files (x86)\Razer Chroma SDK\bin;C:\Program Files\Razer Chroma SDK\bin;C:\ProgramData\Oracle\Java\javapath;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)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\ProgramData\Razer\SwitchBlade\SDK;C:\Users\user\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;D:\Program Files\nodejs\;C:\Prog;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)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\Git\cmd;D:\Program Files\PuTTY\;C:\Users\user\AppData\Roaming\npm;C:\Users\user\AppData\Local\Microsoft\WindowsApps;D:\Program Files\php;D:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\user\AppData\Local\GitHubDesktop\bin;D:\Users\user\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin
10 verbose lifecycle [email protected]~local: CWD: D:\GitHub\screeps-typescript-starter
11 silly lifecycle [email protected]~local: Args: [ '/d /s /c', 'webpack --colors --env.ENV=local' ]
12 silly lifecycle [email protected]~local: Returned: code: 1  signal: null
13 info lifecycle [email protected]~local: Failed to exec local script
14 verbose stack Error: [email protected] local: `webpack --colors --env.ENV=local`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (D:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:232:16)
14 verbose stack     at emitTwo (events.js:87:13)
14 verbose stack     at EventEmitter.emit (events.js:172:7)
14 verbose stack     at ChildProcess.<anonymous> (D:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
14 verbose stack     at emitTwo (events.js:87:13)
14 verbose stack     at ChildProcess.emit (events.js:172:7)
14 verbose stack     at maybeClose (internal/child_process.js:821:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid [email protected]
16 verbose cwd D:\GitHub\screeps-typescript-starter
17 error Windows_NT 10.0.14393
18 error argv "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "local"
19 error node v5.4.0
20 error npm  v3.3.12
21 error code ELIFECYCLE
22 error [email protected] local: `webpack --colors --env.ENV=local`
22 error Exit status 1
23 error Failed at the [email protected] local script 'webpack --colors --env.ENV=local'.
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 screeps-typescript-starter package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     webpack --colors --env.ENV=local
23 error You can get their info via:
23 error     npm owner ls screeps-typescript-starter
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
@pathurs
Copy link
Author

pathurs commented Sep 13, 2017

Turns out I had to update NPM and Node to latest.

Perhaps consider requiring specific versions of these, and adding this to the FAQ, or mentioning it somewhere :)

@resir014
Copy link
Member

resir014 commented Sep 13, 2017 via email

@pathurs
Copy link
Author

pathurs commented Sep 14, 2017

Wasn't a huge problem, however knowing that this is intended for "noobs", then I figured someone in my situation without my knowledge could have been 10x more confused

@wolffman122
Copy link

Think I am still having similar error but attaching my log file. I Just updated node which node is at 8.7.0 and npm is at 5.4.2. The only other strange thing when I do npm install it says typings is depcrated not sure if that is a problem. Any help would be appreciated.

2017-10-24T00_35_10_244Z-debug.log

@resir014
Copy link
Member

@wolffman122 What did the console say before throwing out the error? If it's the same as above, try installing tslint and webpack globally.

Also, typings is in fact, deprecated since the typing system is moved over to @types/ and built-in typings within packages. The reason we're still using typings is we still need to wait up for the type declarations that we use to be published to DefinitelyTyped.

screepers/Screeps-Typescript-Declarations#120

@wolffman122
Copy link

wolffman122 commented Oct 24, 2017

image

image

@resir014 also do you have any instructions on installing those two things I am not to familiar how to?

@resir014
Copy link
Member

resir014 commented Oct 24, 2017 via email

@wolffman122
Copy link

@resir014 i have my credentials.json open and put my emailin, then password, do i have to put anything in for TOKEN or SERVER_PASS if i am doing this on the production screeps server? Not sure where the keys you are referring to are

@resir014
Copy link
Member

resir014 commented Oct 24, 2017 via email

@wolffman122
Copy link

@resir014 worked thank you so much

@resir014
Copy link
Member

@wolffman122 You're welcome!

I'm going to close this issue later since the issues here are mostly trivial and can be fixed by improving the documentation. It's not perfect, but I'm open for improvements to the docs.

@ChrisTaylorRocks
Copy link

The latest build has errors helped people on slack with the version from 9/14 and works fine.
Output from npm run local
https://hastebin.com/aqahutajoy.lua

@resir014
Copy link
Member

Confirmed working as per the Slack discussion earlier. Closing this now.

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