pongstylin / tactics

A tactical turn-based board game
The Unlicense
75 stars 23 forks source link

npm start fails? #37

Closed fransyozef closed 5 years ago

fransyozef commented 5 years ago

Hi .. I get an error when doing npm start:

MacBook-Air:tactics me$ npm start

> tactics@0.2.6 start /Users/me/Projects/other/tactics
> NODE_ENV=development webpack --watch --progress --hide-modules & node --experimental-modules --loader ./resolver.mjs --require dotenv/config src/server.js || true

(node:4731) ExperimentalWarning: The ESM module loader is experimental.
ReferenceError: URL is not defined
    at file:///Users/me/Projects/other/tactics/resolver.mjs:18:17
    at ModuleJob.run (internal/modules/esm/ModuleJob.js:106:14)
    at <anonymous>
MacBook-Air:tactics me$   0% compiling
webpack is watching the files…

Hash: 6d47d01fa6d1309d4776                                                                
Version: webpack 4.23.1
Time: 3034ms
Built at: 2019-05-09 23:38:13
             Asset      Size       Chunks                    Chunk Names
  chaos-app.min.js  24.4 KiB    chaos-app  [emitted]         chaos-app
classic-app.min.js  24.8 KiB  classic-app  [emitted]         classic-app
 createGame.min.js   157 KiB   createGame  [emitted]         createGame
faceoff-app.min.js    24 KiB  faceoff-app  [emitted]         faceoff-app
   game-app.min.js  32.8 KiB     game-app  [emitted]         game-app
    tactics.min.js  4.85 MiB      tactics  [emitted]  [big]  tactics
         ww.min.js   773 KiB           ww  [emitted]  [big]  ww
Entrypoint tactics [big] = tactics.min.js
Entrypoint faceoff-app = faceoff-app.min.js
Entrypoint chaos-app = chaos-app.min.js
Entrypoint classic-app = classic-app.min.js
Entrypoint game-app = game-app.min.js
Entrypoint ww [big] = ww.min.js
Entrypoint createGame = createGame.min.js

MacBook-Air:tactics me$ 
MacBook-Air:tactics me$ npm --v
6.9.0
MacBook-Air:tactics me$ 

What could be the problem?

pongstylin commented 5 years ago

I have made some radical changes to the dev environment recently as I sprint to basic server support. A number of 3rd party packages have been added. Did you run npm install?

pongstylin commented 5 years ago

Actually, I have a better theory. Your version of NodeJS is too old. v10 minimum

fransyozef commented 5 years ago

ok will try node 10.x

fransyozef commented 5 years ago

tried it, but no luck

MacBook-Air:tactics me$ npm i --verbose
npm info it worked if it ends with ok
npm verb cli [ '/Users/me/.nvm/versions/node/v10.15.3/bin/node',
npm verb cli   '/Users/me/.nvm/versions/node/v10.15.3/bin/npm',
npm verb cli   'i',
npm verb cli   '--verbose' ]
npm info using npm@6.4.1
npm info using node@v10.15.3
npm verb npm-session 12da914eb5aee4e3
npm info lifecycle tactics@0.2.6~preinstall: tactics@0.2.6
npm timing stage:loadCurrentTree Completed in 1887ms
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 6ms
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 638ms
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 778ms
npm timing stage:loadIdealTree Completed in 1708ms
npm timing stage:generateActionsToTake Completed in 82ms
npm verb correctMkdir /Users/me/.npm/_locks correctMkdir not in flight; initializing
npm verb lock using /Users/me/.npm/_locks/staging-2d49edac087fc1e7.lock for /Users/me/Projects/other/tactics/node_modules/.staging
npm verb unlock done using /Users/me/.npm/_locks/staging-2d49edac087fc1e7.lock for /Users/me/Projects/other/tactics/node_modules/.staging
npm timing stage:executeActions Completed in 16ms
npm timing stage:rollbackFailedOptional Completed in 0ms
npm info linkStuff tactics@0.2.6
npm info lifecycle tactics@0.2.6~install: tactics@0.2.6
npm info lifecycle tactics@0.2.6~postinstall: tactics@0.2.6
npm info lifecycle tactics@0.2.6~prepublish: tactics@0.2.6
npm timing audit compress Completed in 20ms
npm info audit Submitting payload of 33463bytes
npm info lifecycle tactics@0.2.6~prepare: tactics@0.2.6
npm timing stage:runTopLevelLifecycles Completed in 4113ms
npm verb saving []
npm verb shrinkwrap skipping write for package.json because there were no changes.
npm info lifecycle undefined~preshrinkwrap: undefined
npm info lifecycle undefined~shrinkwrap: undefined
npm verb shrinkwrap skipping write for package-lock.json because there were no changes.
npm info lifecycle undefined~postshrinkwrap: undefined
npm timing audit submit Completed in 8433ms
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 8311ms
npm timing audit body Completed in 1ms
audited 5166 packages in 12.364s
found 1 high severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
npm verb exit [ 0, true ]
npm timing npm Completed in 12707ms
npm info ok 
MacBook-Air:tactics me$ npm start

> tactics@0.2.6 start /Users/me/Projects/other/tactics
> NODE_ENV=development webpack --watch --progress --hide-modules & node --experimental-modules --loader ./resolver.mjs --require dotenv/config src/server.js || true

(node:5189) ExperimentalWarning: The ESM module loader is experimental.
{ [Error: ENOENT: no such file or directory, open '/Users/me/Projects/other/tactics/Users/me/Projects/other/tactics/src/server.js']
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path:
   '/Users/me/Projects/other/tactics/Users/me/Projects/other/tactics/src/server.js' }
MacBook-Air:tactics me$   0% compiling
webpack is watching the files…

Hash: 6d47d01fa6d1309d4776                                                                
Version: webpack 4.23.1
Time: 2755ms
Built at: 05/10/2019 9:24:59 AM
             Asset      Size       Chunks                    Chunk Names
  chaos-app.min.js  24.4 KiB    chaos-app  [emitted]         chaos-app
classic-app.min.js  24.8 KiB  classic-app  [emitted]         classic-app
 createGame.min.js   157 KiB   createGame  [emitted]         createGame
faceoff-app.min.js    24 KiB  faceoff-app  [emitted]         faceoff-app
   game-app.min.js  32.8 KiB     game-app  [emitted]         game-app
    tactics.min.js  4.85 MiB      tactics  [emitted]  [big]  tactics
         ww.min.js   773 KiB           ww  [emitted]  [big]  ww
Entrypoint tactics [big] = tactics.min.js
Entrypoint faceoff-app = faceoff-app.min.js
Entrypoint chaos-app = chaos-app.min.js
Entrypoint classic-app = classic-app.min.js
Entrypoint game-app = game-app.min.js
Entrypoint ww [big] = ww.min.js
Entrypoint createGame = createGame.min.js

MacBook-Air:tactics me$ npm --v
6.4.1
MacBook-Air:tactics me$ nodejs --v
-bash: nodejs: command not found
MacBook-Air:tactics me$ nvm list
        v6.16.0
        v7.10.1
        v8.15.0
        v9.11.2
->     v10.15.3
         system
default -> 9 (-> v9.11.2)
node -> stable (-> v10.15.3) (default)
stable -> 10.15 (-> v10.15.3) (default)
iojs -> N/A (default)
lts/* -> lts/dubnium (-> v10.15.3)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.16.0 (-> N/A)
lts/dubnium -> v10.15.3
MacBook-Air:tactics me$ 
pongstylin commented 5 years ago

It's a new error, so we're making progress, but now there seems to be a bug in resolver.mjs where it duplicates part of your path. I'll try to reproduce the bug on a Linux machine and will let you know when this is addressed.

pongstylin commented 5 years ago

The bug is fixed now.

fransyozef commented 5 years ago

yes .. it works now! thanks