AlexxNB / tinro

Highly declarative, tiny, dependency free router for Svelte's web applications.
MIT License
669 stars 30 forks source link

ReferenceError: window is not defined #123

Open csellis opened 1 year ago

csellis commented 1 year ago

Hi all, I'm having trouble building a project that has been working long term. I get window is not defined when I try to build.

I've reviewed the code and don't see where tinro could be called on the server

W20221108-11:26:29.199(0)? (STDERR) /Users/christopherellis/.meteor/packages/meteor-tool/.2.8.0.1le8ovo.skbg++os.osx.arm64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.arm64/dev_bundle/server-lib/node_modules/fibers/future.js:280
W20221108-11:26:29.211(0)? (STDERR)                                             throw(ex);
W20221108-11:26:29.211(0)? (STDERR)                                             ^
W20221108-11:26:29.211(0)? (STDERR) 
W20221108-11:26:29.211(0)? (STDERR) ReferenceError: window is not defined
W20221108-11:26:29.211(0)? (STDERR)     at Object.getDefault (/Users/christopherellis/Work/mi/node_modules/tinro/dist/tinro.js:1:2208)
W20221108-11:26:29.211(0)? (STDERR)     at et (/Users/christopherellis/Work/mi/node_modules/tinro/dist/tinro.js:1:2326)
W20221108-11:26:29.211(0)? (STDERR)     at Object.<anonymous> (/Users/christopherellis/Work/mi/node_modules/tinro/dist/tinro.js:1:2299)
W20221108-11:26:29.211(0)? (STDERR)     at Module._compile (internal/modules/cjs/loader.js:1085:14)
W20221108-11:26:29.211(0)? (STDERR)     at Module.Mp._compile (/Users/christopherellis/Work/mi/.meteor/local/build/programs/server/runtime.js:99:23)
W20221108-11:26:29.212(0)? (STDERR)     at Object.Module._extensions..js (/Users/christopherellis/Work/mi/.meteor/local/build/programs/server/runtime.js:131:23)
W20221108-11:26:29.212(0)? (STDERR)     at Module.load (internal/modules/cjs/loader.js:950:32)
W20221108-11:26:29.212(0)? (STDERR)     at Module.Mp.load (/Users/christopherellis/Work/mi/.meteor/local/build/programs/server/runtime.js:46:33)
W20221108-11:26:29.212(0)? (STDERR)     at Function.Module._load (internal/modules/cjs/loader.js:790:12)
W20221108-11:26:29.212(0)? (STDERR)     at Module.require (internal/modules/cjs/loader.js:974:19)
W20221108-11:26:29.212(0)? (STDERR)     at require (internal/modules/cjs/helpers.js:101:18)
W20221108-11:26:29.212(0)? (STDERR)     at npmRequire (/Users/christopherellis/Work/mi/.meteor/local/build/programs/server/npm-require.js:133:12)
W20221108-11:26:29.212(0)? (STDERR)     at Module.useNode (packages/modules-runtime.js:657:18)
W20221108-11:26:29.212(0)? (STDERR)     at module (packages/modules.js:1631:8)
W20221108-11:26:29.212(0)? (STDERR)     at fileEvaluate (packages/modules-runtime.js:336:7)
W20221108-11:26:29.212(0)? (STDERR)     at Module.require (packages/modules-runtime.js:238:14)
=> Exited with code: 1
=> Your application is crashing. Waiting for file change.

Meteor Version 2.8.0 Node 16

NPM packages

  "dependencies": {
    "@babel/runtime": "^7.11.2",
    "@popperjs/core": "^2.11.2",
    "@sendgrid/mail": "^7.6.0",
    "@slack/webhook": "^6.0.0",
    "@svelteschool/svelte-forms": "^0.7.0",
    "@tailwindcss/aspect-ratio": "^0.2.0",
    "@tailwindcss/forms": "^0.2.1",
    "@tailwindcss/typography": "^0.4.0",
    "@types/core-js": "^2.5.4",
    "@types/jasmine": "^3.8.2",
    "@yaireo/knobs": "^1.2.0",
    "accounting-js": "^1.1.1",
    "algoliasearch": "^4.12.0",
    "api": "^4.2.0",
    "autonumeric": "^4.6.0",
    "autoprefixer": "^10.2.6",
    "bcrypt": "^5.0.1",
    "body-parser": "^1.19.0",
    "chart.js": "^3.2.1",
    "crypto-js": "^4.0.0",
    "currency.js": "^2.0.3",
    "dayjs": "^1.10.4",
    "dotenv": "^14.2.0",
    "filestack-js": "^3.23.1",
    "intl": "^1.2.5",
    "isomorphic-fetch": "^3.0.0",
    "lodash": "^4.17.21",
    "meteor-node-stubs": "^1.0.1",
    "node-fetch": "^2.6.7",
    "papaparse": "^5.3.1",
    "postcss-import": "^14.1.0",
    "react": "^16.13.1",
    "react-dom": "^16.13.1",
    "resolve": "^1.20.0",
    "simpl-schema": "^1.12.0",
    "stripe": "^8.148.0",
    "svelte": "^3.31.2",
    "tailwindcss": "^2.2.4",
    "tinro": "0.6.10",
    "underscore": "^1.13.1",
    "xo-developers-components-library": "^0.2.26",
    "xstate": "^4.22.0"
  },
  "devDependencies": {
    "@applitools/eyes-cypress": "^3.22.2",
    "@types/lodash": "^4.14.172",
    "cypress": "^9.2.1",
    "eslint": "^8.7.0",
    "eslint-cli": "^1.1.1",
    "eslint-config-prettier": "^8.3.0",
    "eslint-plugin-svelte3": "^3.4.0",
    "nodemon": "^2.0.12",
    "postcss": "^8.3.5",
    "postcss-load-config": "^3.0.1",
    "prettier": "^2.5.1",
    "prettier-plugin-svelte": "^2.6.0",
    "start-server-and-test": "^1.14.0"
  },

Meteor Packages

# Meteor packages used by this project, one per line.
# Check this file (and the other files in this directory) into your repository.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

meteor-base@1.5.1             # Packages every Meteor app needs to have
mobile-experience@1.1.0       # Packages for a great mobile UX
mongo@1.16.0                   # The database Meteor supports right now
reactive-var@1.0.11            # Reactive variable for tracker

standard-minifier-js@2.8.1    # JS minifier run for production mode
es5-shim@4.8.0                # ECMAScript 5 compatibility for older browsers
ecmascript@0.16.2              # Enable ECMAScript2015+ syntax in app code
typescript@4.5.4              # Enable TypeScript syntax in .ts and .tsx modules
shell-server@0.5.0            # Server-side component of the `meteor shell` command
hot-module-replacement@0.5.1  # Update client in development without reloading the page

static-html@1.3.2             # Define static page content in .html files
react-meteor-data       # React higher-order component for reactively tracking Meteor data
rdb:svelte-meteor-data
juliancwirko:postcss
accounts-password@2.3.1
scdstudio-accounts-ui
alanning:roles
mdg:meteor-apm-agent
easy:search
email@2.2.1
zodern:melte