adelsz / pgtyped

pgTyped - Typesafe SQL in TypeScript
https://pgtyped.dev
MIT License
2.92k stars 95 forks source link

npm install feils with Error: Cannot find module './lib/stringify' #496

Closed hakonph closed 1 year ago

hakonph commented 1 year ago

Describe the bug when trying to run npm i in the project it fails with: Error: Cannot find module './lib/stringify' on mac os v 13.2.1 Node.js v18.14.1 alsow testet with node 19 and 16

terminal output ``` ❯ npm i npm WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs npm WARN deprecated tslint@6.1.3: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information. npm ERR! code 1 npm ERR! path /patToProject/pgtyped/node_modules/nx npm ERR! command failed npm ERR! command sh -c node ./bin/compute-project-graph npm ERR! node:internal/modules/cjs/loader:1078 npm ERR! throw err; npm ERR! ^ npm ERR! npm ERR! Error: Cannot find module './lib/stringify' npm ERR! Require stack: npm ERR! - /patToProject/pgtyped/node_modules/braces/index.js npm ERR! - /patToProject/pgtyped/node_modules/micromatch/index.js npm ERR! - /patToProject/pgtyped/node_modules/nx/node_modules/fast-glob/out/utils/pattern.js npm ERR! - /patToProject/pgtyped/node_modules/nx/node_modules/fast-glob/out/utils/index.js npm ERR! - /patToProject/pgtyped/node_modules/nx/node_modules/fast-glob/out/managers/tasks.js npm ERR! - /patToProject/pgtyped/node_modules/nx/node_modules/fast-glob/out/index.js npm ERR! - /patToProject/pgtyped/node_modules/nx/src/config/workspaces.js npm ERR! - /patToProject/pgtyped/node_modules/nx/src/project-graph/file-utils.js npm ERR! - /patToProject/pgtyped/node_modules/nx/src/project-graph/build-dependencies/typescript-import-locator.js npm ERR! - /patToProject/pgtyped/node_modules/nx/src/project-graph/build-dependencies/explicit-project-dependencies.js npm ERR! - /patToProject/pgtyped/node_modules/nx/src/project-graph/build-dependencies/index.js npm ERR! - /patToProject/pgtyped/node_modules/nx/src/project-graph/build-project-graph.js npm ERR! - /patToProject/pgtyped/node_modules/nx/src/project-graph/project-graph.js npm ERR! - /patToProject/pgtyped/node_modules/nx/bin/compute-project-graph.js npm ERR! at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15) npm ERR! at Module._load (node:internal/modules/cjs/loader:920:27) npm ERR! at Module.require (node:internal/modules/cjs/loader:1141:19) npm ERR! at require (node:internal/modules/cjs/helpers:110:18) npm ERR! at Object. (/patToProject/pgtyped/node_modules/braces/index.js:3:19) npm ERR! at Module._compile (node:internal/modules/cjs/loader:1254:14) npm ERR! at Module._extensions..js (node:internal/modules/cjs/loader:1308:10) npm ERR! at Module.load (node:internal/modules/cjs/loader:1117:32) npm ERR! at Module._load (node:internal/modules/cjs/loader:958:12) npm ERR! at Module.require (node:internal/modules/cjs/loader:1141:19) { npm ERR! code: 'MODULE_NOT_FOUND', npm ERR! requireStack: [ npm ERR! '/patToProject/pgtyped/node_modules/braces/index.js', npm ERR! '/patToProject/pgtyped/node_modules/micromatch/index.js', npm ERR! '/patToProject/pgtyped/node_modules/nx/node_modules/fast-glob/out/utils/pattern.js', npm ERR! '/patToProject/pgtyped/node_modules/nx/node_modules/fast-glob/out/utils/index.js', npm ERR! '/patToProject/pgtyped/node_modules/nx/node_modules/fast-glob/out/managers/tasks.js', npm ERR! '/patToProject/pgtyped/node_modules/nx/node_modules/fast-glob/out/index.js', npm ERR! '/patToProject/pgtyped/node_modules/nx/src/config/workspaces.js', npm ERR! '/patToProject/pgtyped/node_modules/nx/src/project-graph/file-utils.js', npm ERR! '/patToProject/pgtyped/node_modules/nx/src/project-graph/build-dependencies/typescript-import-locator.js', npm ERR! '/patToProject/pgtyped/node_modules/nx/src/project-graph/build-dependencies/explicit-project-dependencies.js', npm ERR! '/patToProject/pgtyped/node_modules/nx/src/project-graph/build-dependencies/index.js', npm ERR! '/patToProject/pgtyped/node_modules/nx/src/project-graph/build-project-graph.js', npm ERR! '/patToProject/pgtyped/node_modules/nx/src/project-graph/project-graph.js', npm ERR! '/patToProject/pgtyped/node_modules/nx/bin/compute-project-graph.js' npm ERR! ] npm ERR! } npm ERR! npm ERR! Node.js v18.14.1 npm ERR! A complete log of this run can be found in: npm ERR! /som_long_path/.npm/_logs/2023-02-20T14_48_31_592Z-debug-0.log ```
adelsz commented 1 year ago
Screenshot 2023-02-22 at 11 12 18

Can't reproduce this locally, it is probably a problem with your Node setup. Our Github CI runners also install and test the monorepo multiple times a day on multiple node versions.