Skip to content
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

[Meteor] Spiderable goes into tests #29

Closed
StorytellerCZ opened this issue Feb 12, 2025 · 5 comments
Closed

[Meteor] Spiderable goes into tests #29

StorytellerCZ opened this issue Feb 12, 2025 · 5 comments

Comments

@StorytellerCZ
Copy link

I've run into a problem with the latest version (2.1) version of this package where Spiderable starts accessing/compiling files that it should not, specifically in my case it tries to work through tests files which includes const { name } = await import('../package.json') and that trips it and prevents it from the Meteor app being build with the following error:

W20250212-22:58:33.057(1)? (STDERR) packages/core-runtime.js:189
W20250212-22:58:33.065(1)? (STDERR)             throw error;
W20250212-22:58:33.066(1)? (STDERR)             ^
W20250212-22:58:33.066(1)? (STDERR) 
W20250212-22:58:33.066(1)? (STDERR) Error: Cannot find module '../package.json'
W20250212-22:58:33.067(1)? (STDERR)     at makeMissingError (packages/modules-runtime.js:221:12)
W20250212-22:58:33.067(1)? (STDERR)     at Module.require (packages/modules-runtime.js:240:17)
W20250212-22:58:33.067(1)? (STDERR)     at Module.mod.require (/home/storyteller/.meteor/packages/modules/.0.20.3.1l9ud9l9blw++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/@meteorjs/reify/lib/runtime/index.js:30:33)
W20250212-22:58:33.068(1)? (STDERR)     at require (packages/modules-runtime.js:257:21)
W20250212-22:58:33.068(1)? (STDERR)     at packages/ostrio:spiderable-middleware/lib/index.js:42:22
W20250212-22:58:33.069(1)? (STDERR)     at module (packages/ostrio:spiderable-middleware/lib/index.js:486:6)
W20250212-22:58:33.069(1)? (STDERR)     at fileEvaluate (packages/modules-runtime.js:335:7)
W20250212-22:58:33.069(1)? (STDERR)     at Module.require (packages/modules-runtime.js:237:14)
W20250212-22:58:33.069(1)? (STDERR)     at Module.mod.require (/home/storyteller/.meteor/packages/modules/.0.20.3.1l9ud9l9blw++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/@meteorjs/reify/lib/runtime/index.js:30:33)
W20250212-22:58:33.070(1)? (STDERR)     at Object.require (packages/modules-runtime.js:257:21)
W20250212-22:58:33.070(1)? (STDERR)     at evaluateNextModule (packages/core-runtime.js:167:26)
W20250212-22:58:33.070(1)? (STDERR)     at runEagerModules (packages/core-runtime.js:206:3)
W20250212-22:58:33.070(1)? (STDERR)     at processNext (packages/core-runtime.js:128:3)
W20250212-22:58:33.071(1)? (STDERR)     at packages/core-runtime.js:138:5
W20250212-22:58:33.071(1)? (STDERR)     at evaluateNextModule (packages/core-runtime.js:163:14)
W20250212-22:58:33.071(1)? (STDERR)     at evaluateNextModule (packages/core-runtime.js:202:7)
W20250212-22:58:33.071(1)? (STDERR)     at processNext (packages/core-runtime.js:128:3)
W20250212-22:58:33.072(1)? (STDERR)     at packages/core-runtime.js:138:5
W20250212-22:58:33.072(1)? (STDERR)     at evaluateNextModule (packages/core-runtime.js:163:14)
W20250212-22:58:33.072(1)? (STDERR)     at evaluateNextModule (packages/core-runtime.js:202:7)
W20250212-22:58:33.072(1)? (STDERR)     at runEagerModules (packages/core-runtime.js:206:3)
W20250212-22:58:33.072(1)? (STDERR) 
W20250212-22:58:33.072(1)? (STDERR) Node.js v22.13.1
@dr-dimitru
Copy link
Member

@StorytellerCZ thank you for the report.

  1. Under what conditions you het this error? I tried meteor, meteor --production, and meteor build all works as expected
  2. What version of Meteor?
  3. Installed as Meteor or NPM package?

@StorytellerCZ
Copy link
Author

Latest Meteor (3.1.2), normal start.

Tests location: tests/main.js

package.json relevant parts:

{
  "meteor": {
    "mainModule": {
      "client": "client/main.jsx",
      "server": "server/main.ts"
    },
    "nodeModules": {
      "recompile": {
        "filestack-js": ["client", "legacy"],
        "@literary-universe/styled-icons": "client"
      }
    },
    "testModule": "tests/main.js"
  },
  "scripts": {
    "start": "meteor run --settings settings.local.json --port 4200 --exclude-archs web.browser.legacy,web.cordova --open"
  },
  "dependencies": {
    "@apollo/client": "3.12.11",
    "@apollo/server": "4.11.3",
    "@ariakit/react": "0.4.15",
    "@babel/runtime": "7.26.7",
    "@graphql-tools/merge": "9.0.19",
    "@graphql-tools/schema": "10.0.18",
    "@graphql-tools/utils": "10.8.1",
    "@hello-pangea/dnd": "17.0.0",
    "@ladjs/country-language": "1.0.3",
    "@literary-universe/styled-icons": "0.8.2",
    "@meteorjs/ddp-graceful-shutdown": "0.9.2",
    "@stripe/connect-js": "3.3.21",
    "@stripe/react-connect-js": "3.3.20",
    "@stripe/react-stripe-js": "3.1.1",
    "@stripe/stripe-js": "5.6.0",
    "@tiptap/extension-character-count": "2.11.5",
    "@tiptap/extension-focus": "2.11.5",
    "@tiptap/extension-font-family": "2.11.5",
    "@tiptap/extension-image": "2.11.5",
    "@tiptap/extension-link": "2.11.5",
    "@tiptap/extension-placeholder": "2.11.5",
    "@tiptap/extension-table": "2.11.5",
    "@tiptap/extension-table-cell": "2.11.5",
    "@tiptap/extension-table-header": "2.11.5",
    "@tiptap/extension-table-row": "2.11.5",
    "@tiptap/extension-text-align": "2.11.5",
    "@tiptap/extension-text-style": "2.11.5",
    "@tiptap/extension-underline": "2.11.5",
    "@tiptap/pm": "2.11.5",
    "@tiptap/react": "2.11.5",
    "@tiptap/starter-kit": "2.11.5",
    "bcrypt": "5.1.1",
    "filestack-adaptive": "1.4.0",
    "filestack-js": "3.37.5",
    "final-form": "4.20.10",
    "final-form-arrays": "3.1.0",
    "final-form-calculate": "1.3.2",
    "final-form-focus": "1.1.2",
    "graphql": "16.10.0",
    "graphql-depth-limit": "1.1.0",
    "graphql-scalars": "1.24.1",
    "immutable": "5.0.3",
    "input-otp": "1.4.2",
    "match-sorter": "8.0.0",
    "message-box": "1.0.0",
    "meteor-node-stubs": "1.2.12",
    "mjml": "4.15.3",
    "polished": "4.3.1",
    "react": "19.0.0",
    "react-accessible-accordion": "5.0.0",
    "react-dom": "19.0.0",
    "react-final-form": "6.5.9",
    "react-final-form-arrays": "3.1.4",
    "react-helmet-async": "2.0.5",
    "react-intl": "7.1.6",
    "react-responsive": "10.0.0",
    "react-router-dom": "6.29.0",
    "regenerator-runtime": "0.14.1",
    "stripe": "17.6.0",
    "strman": "2.0.1",
    "styled-components": "6.1.15",
    "styled-tools": "1.7.2",
    "validator": "13.12.0",
    "victory": "37.3.6",
    "xml2js": "0.6.2",
    "xss": "1.0.15"
  },
  "devDependencies": {
    "@babel/core": "7.26.8",
    "@babel/preset-env": "7.26.8",
    "@babel/preset-react": "7.26.3",
    "@biomejs/biome": "1.9.4",
    "@chromatic-com/storybook": "3.2.4",
    "@cypress/code-coverage": "3.13.11",
    "@storybook/addon-a11y": "^8.5.5",
    "@storybook/addon-designs": "^8.2.0",
    "@storybook/addon-essentials": "^8.5.5",
    "@storybook/addon-interactions": "^8.5.5",
    "@storybook/addon-links": "^8.5.5",
    "@storybook/addon-mdx-gfm": "^8.5.5",
    "@storybook/addon-onboarding": "^8.5.5",
    "@storybook/addon-themes": "^8.5.5",
    "@storybook/addon-webpack5-compiler-swc": "^1.0.6",
    "@storybook/blocks": "^8.5.5",
    "@storybook/react": "^8.5.5",
    "@storybook/react-webpack5": "^8.5.5",
    "@storybook/test": "^8.5.5",
    "@storybook/theming": "^8.5.5",
    "@testing-library/cypress": "10.0.3",
    "@types/final-form-focus": "1.1.7",
    "@types/meteor-sjobs": "4.0.8",
    "@types/mjml": "4.7.4",
    "@types/node": "22.13.2",
    "@types/react": "19.0.8",
    "@types/react-dom": "19.0.3",
    "@types/stripe-v3": "3.1.33",
    "@types/strman": "2.0.3",
    "@types/validator": "13.12.2",
    "@types/xml2js": "0.4.14",
    "@whatwg-node/node-fetch": "0.7.8",
    "babel-plugin-istanbul": "7.0.0",
    "babel-plugin-jsx-remove-data-test-id": "3.0.0",
    "babel-plugin-macros": "3.1.0",
    "babel-plugin-object-to-json-parse": "0.2.3",
    "babel-plugin-react-compiler": "^19.0.0-beta-e552027-20250112",
    "babel-plugin-styled-components": "2.1.4",
    "chai": "^5.1.2",
    "cypress": "14.0.3",
    "storybook": "^8.5.5",
    "storybook-addon-remix-react-router": "^3.1.0",
    "storybook-react-intl": "^3.2.3",
    "typescript": "5.7.3",
    "webpack": "5.97.1"
  }
}

Meteor packages:

[email protected]                 # Packages every Meteor app needs to have
[email protected]           # Packages for a great mobile UX
[email protected]                       # The database Meteor supports right now
[email protected]                # Reactive variable for tracker
[email protected]                     # Meteor's client-side reactive programming library

[email protected]        # JS minifier run for production mode
[email protected]                    # ECMAScript 5 compatibility for older browsers.
[email protected]                  # Enable ECMAScript2015+ syntax in app code
[email protected]                # Server-side component of the `meteor shell` command

# testing

# development
percolate:migrations

# technical from Meteor
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
react-meteor-data
[email protected]
[email protected]
mdg:seo
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

# GraphQL
apollo
swydo:graphql

# collections
aldeed:simple-schema
aldeed:collection2
aldeed:schema-deny

natestrauser:publish-performant-counts
reywood:publish-composite
matb33:[email protected]

# jam
jam:pub-sub

# socialize
socialize:base-model
socialize:commentable
socialize:friendships
socialize:likeable
socialize:linkable-model
socialize:messaging
socialize:postable
socialize:requestable
socialize:server-presence
socialize:server-time
socialize:user-blocking
socialize:user-model
socialize:user-presence
socialize:user-profile
socialize:feed
socialize:voteable

# accounts
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
storyteller:accounts-line
[email protected]
freedombase:legal-management
react-meteor-state
react-meteor-accounts
storyteller:accounts-discord
storyteller:accounts-betapass
storyteller:accounts-seznam
bozhao:link-accounts
[email protected]

# LU specific
storyteller:fictionaltime
freedombase:forums
lu-intl

# Financial packages
freedombase:payments-core
freedombase:payments-provider-stripe
freedombase:payments-subscriptions
freedombase:payments-platform
freedombase:payments-checkout

# other
freedombase:flashnews
storyteller:ssl
zodern:types
storyteller:cdn
msavin:sjobs
ostrio:spiderable-middleware

montiapm:agent@=3.0.0-beta.14

# Testing
meteortesting:mocha
# lmieulet:[email protected]

# Load jam:offline last or at least after any packages with collections
jam:offline

@dr-dimitru
Copy link
Member

@StorytellerCZ please try v2.2.0 should be fixed now

@StorytellerCZ
Copy link
Author

No initial problems. Thanks a lot! Will keep you posted if something shows up.

@dr-dimitru
Copy link
Member

@StorytellerCZ thanks a lot for original report and swift testing on your end 🤝

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

2 participants