-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[BUG] npm install causes : Cannot read properties of null (reading 'explain') #5222
Comments
We're going to need more steps to reproduce. What are the contents of your |
Here are the dependencies:
|
I'll make a quick PR to fix this edge case, but once fixed ...
|
I got the same error trying to install a new dependency, running npm from Apt on Ubuntu 22.04.4: npm i '@mikro-orm/migrations-mongodb' Debug logs (click to expand)0 verbose cli /usr/bin/node /usr/bin/npm
1 info using npm@9.6.7
2 info using node@v18.17.1
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:/usr/lib/node_modules/npm/npmrc Completed in 0ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:~/src/my-project/.npmrc Completed in 0ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:~/.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:/usr/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:setEnvs Completed in 1ms
16 timing config:load Completed in 5ms
17 timing npm:load:configload Completed in 5ms
18 timing npm:load:mkdirpcache Completed in 0ms
19 timing npm:load:mkdirplogs Completed in 0ms
20 verbose title npm i @mikro-orm/migrations-mongodb
21 verbose argv "i" "@mikro-orm/migrations-mongodb"
22 timing npm:load:setTitle Completed in 1ms
23 timing config:load:flatten Completed in 1ms
24 timing npm:load:display Completed in 1ms
25 verbose logfile logs-max:10 dir:~/.npm/_logs/2024-07-01T00_39_40_792Z-
26 verbose logfile ~/.npm/_logs/2024-07-01T00_39_40_792Z-debug-0.log
27 timing npm:load:logFile Completed in 7ms
28 timing npm:load:timers Completed in 1ms
29 timing npm:load:configScope Completed in 0ms
30 timing npm:load Completed in 16ms
31 timing arborist:ctor Completed in 0ms
32 silly logfile start cleaning logs, removing 1 files
33 silly logfile done cleaning log files
34 timing idealTree:init Completed in 683ms
35 timing idealTree:userRequests Completed in 1ms
36 silly idealTree buildDeps
37 silly fetch manifest @mikro-orm/migrations-mongodb@*
38 verbose shrinkwrap failed to load node_modules/.package-lock.json out of date, updated: node_modules/@mikro-orm/mongodb
39 http fetch GET 200 https://registry.npmjs.org/@mikro-orm%2fmigrations-mongodb 71ms (cache hit)
40 silly fetch manifest @mikro-orm/core@^5.5.2
41 http fetch GET 200 https://registry.npmjs.org/@mikro-orm%2fcore 17ms (cache hit)
42 silly fetch manifest @mikro-orm/core@^6.0.0
43 silly fetch manifest @mikro-orm/better-sqlite@^5.0.0
44 http fetch GET 200 https://registry.npmjs.org/@mikro-orm%2fbetter-sqlite 403ms (cache hit)
45 silly fetch manifest @mikro-orm/entity-generator@^5.0.0
46 http fetch GET 200 https://registry.npmjs.org/@mikro-orm%2fentity-generator 67ms (cache hit)
47 silly fetch manifest @mikro-orm/migrations@^5.0.0
48 http fetch GET 200 https://registry.npmjs.org/@mikro-orm%2fmigrations 10ms (cache hit)
49 silly fetch manifest @mikro-orm/seeder@^5.0.0
50 http fetch GET 200 https://registry.npmjs.org/@mikro-orm%2fseeder 9ms (cache hit)
51 silly fetch manifest @mikro-orm/mariadb@^5.0.0
52 http fetch GET 200 https://registry.npmjs.org/@mikro-orm%2fmariadb 11ms (cache hit)
53 silly fetch manifest @mikro-orm/migrations-mongodb@^5.0.0
54 silly fetch manifest @mikro-orm/core@^5.0.0
55 silly fetch manifest @mikro-orm/mongodb@^5.0.0
56 http fetch GET 200 https://registry.npmjs.org/@mikro-orm%2fmongodb 8ms (cache hit)
57 silly fetch manifest @mikro-orm/mysql@^5.0.0
58 http fetch GET 200 https://registry.npmjs.org/@mikro-orm%2fmysql 9ms (cache hit)
59 silly fetch manifest @mikro-orm/postgresql@^5.0.0
60 http fetch GET 200 https://registry.npmjs.org/@mikro-orm%2fpostgresql 7ms (cache hit)
61 silly fetch manifest @mikro-orm/sqlite@^5.0.0
62 http fetch GET 200 https://registry.npmjs.org/@mikro-orm%2fsqlite 11ms (cache hit)
63 silly fetch manifest @mikro-orm/mongodb@^5.5.3
64 timing idealTree Completed in 1556ms
65 timing command:i Completed in 1560ms
66 verbose stack TypeError: Cannot read properties of null (reading 'explain')
66 verbose stack at #explainPeerConflict (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1382:29)
66 verbose stack at #failPeerConflict (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1375:43)
66 verbose stack at #loadPeerSet (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1342:33)
66 verbose stack at async #buildDepStep (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:917:11)
66 verbose stack at async Arborist.buildIdealTree (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:196:7)
66 verbose stack at async Promise.all (index 1)
66 verbose stack at async Arborist.reify (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:159:5)
66 verbose stack at async Install.exec (/usr/lib/node_modules/npm/lib/commands/install.js:147:5)
66 verbose stack at async module.exports (/usr/lib/node_modules/npm/lib/cli.js:89:5)
67 verbose cwd ~/src/my-project
68 verbose Linux 6.5.0-41-generic
69 verbose node v18.17.1
70 verbose npm v9.6.7
71 error Cannot read properties of null (reading 'explain')
72 verbose exit 1
73 timing npm Completed in 1670ms
74 verbose unfinished npm timer reify 1719794380901
75 verbose unfinished npm timer reify:loadTrees 1719794380903
76 verbose unfinished npm timer idealTree:buildDeps 1719794381588
77 verbose unfinished npm timer idealTree:#root 1719794381588
78 verbose code 1
79 error A complete log of this run can be found in: ~/.npm/_logs/2024-07-01T00_39_40_792Z-debug-0.log package.json (click to expand){
"name": "@my-org/my-project",
"version": "0.0.0",
"license": "UNLICENSED",
"scripts": {
"start": "nx serve",
"build": "nx build",
"gen-spec": "nx gen-spec",
"lint": "nx lint",
"test": "nx test",
"test:app1:scenario1:end-to-end": "ts-node --esm --project ./apps/app1/tsconfig.spec.json ./apps/app1/test/scenario1.e2e.ts"
},
"private": true,
"devDependencies": {
"@nestjs/cli": "^9.0.0",
"@nestjs/schematics": "^9.0.0",
"@nestjs/testing": "^9.0.0",
"@nrwl/cli": "15.0.3",
"@nrwl/eslint-plugin-nx": "15.0.3",
"@nrwl/jest": "^15.0.3",
"@nrwl/js": "15.0.3",
"@nrwl/linter": "15.0.3",
"@nrwl/nest": "15.0.3",
"@nrwl/node": "15.0.3",
"@nrwl/workspace": "15.0.3",
"@types/express": "^4.17.13",
"@types/jest": "28.1.1",
"@types/node": "16.11.7",
"@types/passport-azure-ad": "^4.3.1",
"@types/supertest": "^2.0.11",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"aws-sdk-client-mock": "^3.0.0",
"eslint": "^8.0.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "28.1.1",
"jest-environment-jsdom": "28.1.1",
"jest-junit": "^15.0.0",
"nx": "15.0.3",
"prettier": "^2.6.2",
"source-map-support": "^0.5.20",
"supertest": "^6.1.3",
"swagger-ui-express": "^4.4.0",
"ts-jest": "28.0.5",
"ts-loader": "^9.2.3",
"ts-node": "10.9.1",
"tsconfig-paths": "4.0.0",
"typescript": "~4.8.2"
},
"dependencies": {
"@aws-sdk/client-dynamodb": "^3.405.0",
"@aws-sdk/lib-dynamodb": "^3.405.0",
"@azure/cosmos": "^3.17.3",
"@azure/identity": "^3.1.3",
"@azure/keyvault-secrets": "^4.6.0",
"@azure/service-bus": "^7.7.2",
"@azure/storage-blob": "^12.13.0",
"@mikro-orm/core": "^5.5.2",
"@mikro-orm/mongodb": "^5.5.3",
"@mikro-orm/nestjs": "^5.1.2",
"@nestjs/common": "^9.0.0",
"@nestjs/config": "^2.2.0",
"@nestjs/core": "^9.0.0",
"@nestjs/event-emitter": "^1.3.1",
"@nestjs/mapped-types": "*",
"@nestjs/passport": "^9.0.0",
"@nestjs/platform-express": "^9.0.0",
"@nestjs/swagger": "^6.0.5",
"@opentelemetry/auto-instrumentations-node": "^0.36.6",
"ajv": "^8.11.2",
"ajv-formats": "^2.1.1",
"applicationinsights": "^3.0.0-beta.4",
"class-transformer": "^0.5.1",
"class-validator": "^0.13.2",
"deepmerge": "^4.3.1",
"fast-json-patch": "^3.1.1",
"glob-to-regexp": "^0.4.1",
"helmet": "^6.1.5",
"nestjs-pino": "^3.2.0",
"obj2gltf": "^3.1.6",
"passport": "^0.6.0",
"passport-azure-ad": "^4.3.4",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^7.0.0",
"tslib": "^2.3.0"
}
} |
because of npm/cli#5222
because of npm/cli#5222
because of npm/cli#5222
just had a similar issue, i tried running possibly related? vitest-dev/vitest#6111
package.json{
"name": "next-axiom",
"description": "Send WebVitals from your Next.js project to Axiom.",
"version": "1.4.0",
"author": "Axiom, Inc.",
"license": "MIT",
"contributors": [
"Arne Bahlo <[email protected]>",
"Islam Shehata <[email protected]>"
],
"engines": {
"node": ">=18"
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc",
"prepare": "npm run build",
"format": "prettier --write src/*.ts tests/*.ts",
"check-format": "prettier -c src/*.ts tests/*.ts",
"test": "vitest run tests --coverage"
},
"repository": {
"type": "git",
"url": "git+https://github.com/axiomhq/next-axiom.git"
},
"keywords": [
"web-vitals",
"axiom",
"observability",
"performance",
"nextjs"
],
"bugs": {
"url": "https://github.com/axiomhq/next-axiom/issues"
},
"homepage": "https://github.com/axiomhq/next-axiom#readme",
"peerDependencies": {
"next": ">=14.0",
"react": ">=18.0.0"
},
"devDependencies": {
"@types/node": "^20.4.2",
"@types/react": "^18.2.15",
"@vitest/coverage-v8": "^1.2.2",
"prettier": "^3.0.0",
"ts-node": "^10.9.1",
"typescript": "^5.1.6",
"vitest": "^1.2.2",
"whatwg-fetch": "^3.6.2"
},
"dependencies": {
"use-deep-compare": "^1.2.1"
}
} debug logs0 verbose cli /Users/luna/.nvm/versions/node/v20.13.1/bin/node /Users/luna/.nvm/versions/node/v20.13.1/bin/npm |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
npm install causes following error:
Expected Behavior
Install packages defined in package.json
Steps To Reproduce
Download repo
cd into repo
npm install
Environment
node bin location = /usr/local/bin/node
; node version = v16.16.0
; npm local prefix = /Users/tpa/src/cb-app-www
; npm version = 8.15.0
The text was updated successfully, but these errors were encountered: