LinbuduLab / esbuild-plugins

ESBuild plugins by @LinbuduLab
MIT License
113 stars 18 forks source link

[bug] The build does not work when updating to NX 13.10.* #80

Closed ablackoff closed 2 years ago

ablackoff commented 2 years ago

Hi there, When migrating to version 13.10.2, an error crashes:

node:internal/modules/cjs/loader:933
  const err = new Error(message);
              ^

Error: Cannot find module 'nx/tasks-runners/default'
Require stack:
- /Users/a.blackoff/Project/thesollution/thesollution/node_modules/@nrwl/workspace/src/tasks-runner/run-command.js
- /Users/a.blackoff/Project/thesollution/thesollution/node_modules/@nrwl/workspace/src/command-line/run-one.js
- /Users/a.blackoff/Project/thesollution/thesollution/node_modules/nx/src/cli/init-local.js
- /Users/a.blackoff/Project/thesollution/thesollution/node_modules/nx/bin/nx.js
- /usr/local/lib/node_modules/nx/bin/nx.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (/Users/a.blackoff/Project/thesollution/thesollution/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at getRunner (/Users/a.blackoff/Project/thesollution/thesollution/node_modules/@nrwl/workspace/src/tasks-runner/run-command.js:298:27)
    at /Users/a.blackoff/Project/thesollution/thesollution/node_modules/@nrwl/workspace/src/tasks-runner/run-command.js:67:48
    at Generator.next (<anonymous>)
    at /Users/a.blackoff/Project/thesollution/thesollution/node_modules/tslib/tslib.js:117:75
    at new Promise (<anonymous>)
    at __awaiter (/Users/a.blackoff/Project/thesollution/thesollution/node_modules/tslib/tslib.js:113:16) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/a.blackoff/Project/thesollution/thesollution/node_modules/@nrwl/workspace/src/tasks-runner/run-command.js',
    '/Users/a.blackoff/Project/thesollution/thesollution/node_modules/@nrwl/workspace/src/command-line/run-one.js',
    '/Users/a.blackoff/Project/thesollution/thesollution/node_modules/nx/src/cli/init-local.js',
    '/Users/a.blackoff/Project/thesollution/thesollution/node_modules/nx/bin/nx.js',
    '/usr/local/lib/node_modules/nx/bin/nx.js'
  ]
}

As I understand it, the path to TaskRunner has changed.

This can be viewed in the migration: https://github.com/nrwl/nx/blob/master/packages/workspace/src/migrations/update-13-10-0/update-tasks-runner.ts

linbudu599 commented 2 years ago

Yeah I see it, nx 13.10 made some breaking changes that doesnot follow the semver rule at all, I will release a adapted version in another package tag.

ablackoff commented 2 years ago

@linbudu599 Hi, and when will you be able to fix the problem and publish a new tag?

linbudu599 commented 2 years ago

@linbudu599 Hi, and when will you be able to fix the problem and publish a new tag?

This Saturday at the earliest, the work is killing me :(

griiettner commented 2 years ago

I appreciate you guys creating this plugin and I want to report similar issue.

paulo@paulos-mbp test-prisma % yarn nx g nx-plugin-prisma:init --app api
yarn run v1.22.5
$ /Users/paulo/Projects/test-prisma/node_modules/.bin/nx g nx-plugin-prisma:init --app api
Cannot find module '@nrwl/workspace/src/utilities/perf-logging'
Require stack:
- /Users/paulo/Projects/test-prisma/node_modules/nx/src/cli/init-local.js
- /Users/paulo/Projects/test-prisma/node_modules/nx/bin/nx.js
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Environment

    "@nrwl/cli": "^13.10.2",
    "@nrwl/cypress": "14.0.1",
    "@nrwl/detox": "14.0.1",
    "@nrwl/devkit": "14.0.1",
    "@nrwl/eslint-plugin-nx": "14.0.1",
    "@nrwl/jest": "14.0.1",
    "@nrwl/linter": "14.0.1",
    "@nrwl/node": "14.0.1",
    "@nrwl/react": "14.0.1",
    "@nrwl/react-native": "14.0.1",
    "@nrwl/storybook": "14.0.1",
    "@nrwl/tao": "^13.10.2",
    "@nrwl/web": "14.0.1",
    "@nrwl/workspace": "14.0.1",
    "nx": "14.0.1",
    "nx-plugin-devkit": "^0.5.0",
    "nx-plugin-prisma": "^0.2.2",
    "nx-plugin-workspace": "^0.5.5",
    "prisma": "^3.12.0",
linbudu599 commented 2 years ago

@Anton9408 You can use nx-plugin-vite@2.0.2 in nx workspace V14 now(or since 13.9), I'm not using tag because 1.x version will no longer receive updates, as legacy workspace can migrate to Nx 14 easily.

linbudu599 commented 2 years ago

@griiettner I don't recommend continuing to use prisma plugin, it is seriously outdated(with Prisma or with Nx), you can find better alternative in npm.

ablackoff commented 2 years ago

@linbudu599 Thank you