You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building sample extension using latest vortex-api causes error:
> npx webpack
[webpack-cli] Failed to load 'D:\Projects\mods\kp-vortex-extension\webpack.config.js' config
[webpack-cli] Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './bin/webpack' is not defined by "exports" in D:\Projects\mods\kp-vortex-extension\node_modules\vortex-api\package.json
at exportsNotFound (node:internal/modules/esm/resolve:313:10)
at packageExportsResolve (node:internal/modules/esm/resolve:660:9)
at resolveExports (node:internal/modules/cjs/loader:650:36)
at Function._findPath (node:internal/modules/cjs/loader:717:31)
at Function._resolveFilename (node:internal/modules/cjs/loader:1369:27)
at defaultResolveImpl (node:internal/modules/cjs/loader:1025:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1030:22)
at Function._load (node:internal/modules/cjs/loader:1192:37)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:237:24) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
Description
Building sample extension using latest vortex-api causes error:
Show full package.json
{ "name": "xxx-vortex-extension", "version": "1.0.0", "scripts": { "watch": "npx webpack --watch", "build": "npx webpack --progress --profile --color" }, "devDependencies": { "@types/fs-extra": "^9.0.4", "@types/ini": "^1.3.34", "@types/node": "^18.16.16", "@types/react": "^16.9.43", "@types/react-bootstrap": "^0.32.20", "@types/react-i18next": "^8.1.0", "@types/react-redux": "^7.1.24", "@types/redux": "^3.6.0", "@types/redux-thunk": "^2.1.0", "@types/string-template": "^1.0.7", "copy-webpack-plugin": "^11.0.0", "modmeta-db": "Nexus-Mods/modmeta-db", "string-template": "^1.0.0", "ts-loader": "^9.6.0", "typescript": "^5.9.3", "vortex-api": "Nexus-Mods/vortex-api", "webpack": "^5.107.2", "webpack-cli": "^5.1.4" }, "dependencies": { "ini": "^4.1.1" } }Show full webpack.config.js
I suspect problem is either in typescript v5 or in vortex-api package.json (that lacks export for webpack config)
Workaround
Specified vortex api v1.16.4 in package.json: