chingu-voyage4 / Bears-Team-18

Voyage-4
0 stars 1 forks source link

Part of #1 | Setup/initial setup #14

Closed Jarrku closed 6 years ago

Jarrku commented 6 years ago

Initial setup + packages that we discussed to use already included.

BenGitter commented 6 years ago

I get the following error when running npm run dev with command prompt + git for windows:

Error message `>` bears-team-18@0.1.0 dev C:\Users\benja\Desktop\chingu2 `>` nodemon server/index.ts [nodemon] 1.15.1 [nodemon] to restart at any time, enter `rs` [nodemon] watching: server/**/*.ts [nodemon] starting `ts-node --compilerOptions '{"module":"commonjs"}' server/index.ts` undefined:1 '{module:commonjs}' ^ SyntaxError: Unexpected token ' in JSON at position 0 at JSON.parse () at Object.parse (C:\Users\benja\Desktop\chingu2\node_modules\ts-node\dist\index.js:60:45) at Object. (C:\Users\benja\Desktop\chingu2\node_modules\ts-node\dist\bin.js:60:30) at Module._compile (module.js:660:30) at Object.Module._extensions..js (module.js:671:10) at Module.load (module.js:573:32) at tryModuleLoad (module.js:513:12) at Function.Module._load (module.js:505:3) at Function.Module.runMain (module.js:701:10) at startup (bootstrap_node.js:193:16) [nodemon] app crashed - waiting for file changes before starting...


It works fine with Bash on Ubuntu on Windows, so it is not really a problem for me. @LydiaVuj you are using Windows as well right?

Jarrku commented 6 years ago

I got it to work on cmd but cant get it working with one solution for both platforms.

If you have to use cmd, you can paste in the following snippet in nodemon.json and then we can add it to gitignore to ignore further changes to it.

nodemon.json

{
  "watch": ["server/**/*.ts"],
  "execMap": {
    "ts": "ts-node --compilerOptions \"{\"\"module\"\":\"\"commonjs\"\"}\""
  }
}