play-co / devkit

HTML 5 game platform for browser and mobile
http://docs.gameclosure.com
627 stars 126 forks source link

ReferenceError: GLOBAL is not defined #281

Open konsumer opened 2 years ago

konsumer commented 2 years ago
devkit init devkit-project
/Users/konsumer/.nvm/versions/node/v17.6.0/lib/node_modules/devkit/src/globals.js:4
GLOBAL.Class = base.Class;
^

ReferenceError: GLOBAL is not defined
    at Object.<anonymous> (/Users/konsumer/.nvm/versions/node/v17.6.0/lib/node_modules/devkit/src/globals.js:4:1)
    at Module._compile (node:internal/modules/cjs/loader:1097:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1151:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/konsumer/.nvm/versions/node/v17.6.0/lib/node_modules/devkit/src/devkit.js:30:1)
    at Module._compile (node:internal/modules/cjs/loader:1097:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1151:10)

Node.js v17.6.0
npm 8.5.1
OSX 12.3 on M1

Even devkit --version gives me above error, but it's 3.1.3.

konsumer commented 2 years ago

Changing GLOBAL to global in node_modules/devkit/src/globals.js seems to fix it.