Giter Club home page Giter Club logo

Comments (4)

noelsoong avatar noelsoong commented on September 17, 2024

Found out that eslintrc plugin does not support esm modules so i will try converting my eslint.config.js to eslint.config.cjs

from nx.

noelsoong avatar noelsoong commented on September 17, 2024

converted to eslint.config.cjs and now running into this error

TypeError: Cannot read properties of null (reading 'length')
    at createSourceFile2 (/Users/noelsoong/Workspace/iticket-stack/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:29629:58)
    at parseSourceFileWorker (/Users/noelsoong/Workspace/iticket-stack/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:29502:30)
    at Object.parseSourceFile (/Users/noelsoong/Workspace/iticket-stack/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:29326:26)
    at Object.createSourceFile (/Users/noelsoong/Workspace/iticket-stack/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:28492:23)
    at hasOverride (/Users/noelsoong/Workspace/iticket-stack/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected]_@swc+help_wqxk2dyc3ojsa2rzxwmg4k5uhm/node_modules/@nx/eslint/src/generators/utils/flat-config/ast-utils.js:71:23)
    at lintConfigHasOverride (/Users/noelsoong/Workspace/iticket-stack/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected]_@swc+help_wqxk2dyc3ojsa2rzxwmg4k5uhm/node_modules/@nx/eslint/src/generators/utils/eslint-file.js:178:44)
    at updateProjectEslintConfig (/Users/noelsoong/Workspace/iticket-stack/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected]_@swc+help_qgvghtnpg6cztnx32rcihugbzq/node_modules/@nx/plugin/src/generators/lint-checks/generator.js:109:53)
    at pluginLintCheckGenerator (/Users/noelsoong/Workspace/iticket-stack/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected]_@swc+help_qgvghtnpg6cztnx32rcihugbzq/node_modules/@nx/plugin/src/generators/lint-checks/generator.js:17:9)
    at pluginGeneratorInternal (/Users/noelsoong/Workspace/iticket-stack/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected]_@swc+help_qgvghtnpg6cztnx32rcihugbzq/node_modules/@nx/plugin/src/generators/plugin/plugin.js:102:39)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

nx report now looks like this

Node           : 20.11.1
OS             : darwin-arm64
Native Target  : aarch64-macos
pnpm           : 9.9.0

nx                 : 19.6.3
@nx/js             : 19.6.3
@nx/jest           : 19.6.3
@nx/linter         : 19.6.3
@nx/eslint         : 19.6.3
@nx/workspace      : 19.6.3
@nx/devkit         : 19.6.3
@nx/esbuild        : 19.6.3
@nx/eslint-plugin  : 19.6.3
@nx/node           : 19.6.3
@nx/plugin         : 19.6.3
@nrwl/tao          : 19.6.3
@nx/vite           : 19.6.3
@nx/web            : 19.6.3
typescript         : 5.4.5
---------------------------------------
Registered Plugins:
@nx/eslint/plugin
@nx/vite/plugin

package.json

{
  "name": "@iticketnz/root",
  "license": "MIT",
  "type": "module",
  "packageManager": "[email protected]+sha512.60c18acd138bff695d339be6ad13f7e936eea6745660d4cc4a776d5247c540d0edee1a563695c183a66eb917ef88f2b4feb1fc25f32a7adcadc7aaf3438e99c1",
  "scripts": {
    "build:admin-api": "pnpm nx build admin-api",
    "serve:admin-api": "pnpm nx serve --project=admin-api",
    "build": "pnpm nx run-many --target=build --all",
    "test:unit": "pnpm nx run-many --target=test:unit --all",
    "start": "pnpm nx serve",
    "publish:pnpm": "pnpm publish -r",
    "publish": "nx run-many --target=publish --all",
    "compile": "tsc --project tsconfig.json ",
    "lint": "pnpm nx run-many --target=lint --all ",
    "check:types": "nx run-many --target=check:types --all",
    "clean": "rm -rf dist"
  },
  "private": true,
  "devDependencies": {
    "@eslint/eslintrc": "^3.1.0",
    "@eslint/js": "~9.9.1",
    "@fastify/autoload": "^5.8.0",
    "@fastify/sensible": "~5.6.0",
    "@fastify/swagger": "^8.14.0",
    "@fastify/swagger-ui": "^3.0.0",
    "@fastify/type-provider-typebox": "^4.0.0",
    "@iticketnz/core": "workspace:^",
    "@iticketnz/eslint-config": "workspace:^",
    "@iticketnz/models": "workspace:^",
    "@iticketnz/organisations": "workspace:^",
    "@iticketnz/prettier-config": "workspace:^",
    "@iticketnz/users": "workspace:^",
    "@nx/esbuild": "19.6.3",
    "@nx/eslint": "19.6.3",
    "@nx/eslint-plugin": "19.6.3",
    "@nx/jest": "19.6.3",
    "@nx/js": "19.6.3",
    "@nx/node": "19.6.3",
    "@nx/plugin": "19.6.3",
    "@nx/vite": "19.6.3",
    "@nx/web": "19.6.3",
    "@nx/workspace": "19.6.3",
    "@sinclair/typebox": "^0.28.15",
    "@supabase/supabase-js": "^2.45.1",
    "@swc-node/register": "~1.10.9",
    "@swc/core": "~1.7.18",
    "@swc/helpers": "~0.5.12",
    "@types/eslint__js": "^8.42.3",
    "@types/jest": "^29.5.12",
    "@types/node": "~20.12.7",
    "@typescript-eslint/eslint-plugin": "7.8.0",
    "@typescript-eslint/parser": "7.8.0",
    "@vitest/coverage-v8": "^1.5.2",
    "@vitest/ui": "^1.5.2",
    "ajv": "^8.12.0",
    "applicationinsights": "^3.0.1",
    "axios": "^1.6.0",
    "connection-string": "^4.4.0",
    "copyfiles": "^2.4.1",
    "dotenv": "^16.4.5",
    "esbuild": "^0.23.1",
    "esbuild-plugin-tsc": "^0.4.0",
    "eslint": "~9.9.1",
    "eslint-config-prettier": "^9.1.0",
    "fastify": "~4.26.2",
    "fastify-plugin": "~4.5.0",
    "fluent-json-schema": "^4.2.1",
    "globals": "^15.0.0",
    "jest": "^29.7.0",
    "jest-environment-node": "^29.4.1",
    "jose": "^5.2.2",
    "jsonc-eslint-parser": "^2.4.0",
    "knex": "^3.1.0",
    "knex-paginate": "^3.1.2",
    "libphonenumber-js": "^1.10.45",
    "prettier": "^3.2.5",
    "ts-jest": "^29.1.2",
    "ts-node": "10.9.2",
    "tsconfig-paths": "^4.2.0",
    "tslib": "^2.7.0",
    "typescript": "~5.4.2",
    "vite": "~5.2.10",
    "vite-tsconfig-paths": "^4.3.2",
    "vitest": "^1.5.2"
  },
  "dependencies": {
    "nx": "19.6.3"
  }
}

from nx.

noelsoong avatar noelsoong commented on September 17, 2024

tried nx reset
deleting node_modules and pnpm-lock.yaml
then reinstalling using pnpm i
typescript version still goes to 5.4.5 instead of 5.4.2

from nx.

noelsoong avatar noelsoong commented on September 17, 2024

I fixed it by reverting back to nx version 18.3.4 and converting all the eslint files to .cjs files and converted module imports to common js require and module.exports.

from nx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.