admin管理员组文章数量:1345083
I was trying to setup fabricjs
in my application. since application uses micro-frontends , I use @angular-architects/module-federation
for custom builder. when I install fabricjs
it breaks otherwise it works fine.After investigating I found the error is in federation.config.js
. here is my federation.config.js
.
const {
withNativeFederation,
shareAll,
} = require('@angular-architects/native-federation/config');
module.exports = withNativeFederation({
name: 'Origin',
shared: {
...shareAll({
singleton: true,
strictVersion: true,
requiredVersion: 'auto',
}),
},
skip: [
'fabric',
/^@fabric/,
'rxjs/ajax',
'rxjs/fetch',
'rxjs/testing',
'rxjs/webSocket',
/^@expo/,
/^expo/,
/^react/,
// Add further packages you don't need at runtime
/^@nestjs/,
'class-validator',
'class-transformer',
'redis',
'nats',
/^fastify/,
'winston',
'winston-daily-rotate-file',
'mongoose',
'@arena-pro/backend-support',
'@arena-pro/inn-nats-jetstream',
'@arena-pro/inn-logger',
'@grpc/grpc-js',
'@grpc/proto-loader',
],
// Please read our FAQ about sharing libs:
//
});
here is the error
pnpm run start:frontend --verbose
> @arena-pro/[email protected] start:frontend /workspace
> nx run-many --target=serve --projects=tag:frontend --parallel --verbose
⠙ Creating project graph nodes with 7 plugins(node:28575) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
NX Running target serve for project origin:
- origin
————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
> nx run origin:serve
NX Cannot read properties of null (reading 'default')
TypeError: Cannot read properties of null (reading 'default')
at getDefaultEntry (/workspace/node_modules/.pnpm/@[email protected]/node_modules/@softarc/native-federation/src/lib/config/share-utils.js:181:26)
at readConfiguredSecondaries (/workspace/node_modules/.pnpm/@[email protected]/node_modules/@softarc/native-federation/src/lib/config/share-utils.js:145:23)
at getSecondaries (/workspace/node_modules/.pnpm/@[email protected]/node_modules/@softarc/native-federation/src/lib/config/share-utils.js:112:24)
at Object.share (/workspace/node_modules/.pnpm/@[email protected]/node_modules/@softarc/native-federation/src/lib/config/share-utils.js:304:33)
at shareAll (/workspace/node_modules/.pnpm/@[email protected]/node_modules/@softarc/native-federation/src/lib/config/share-utils.js:216:27)
at Object.<anonymous> (/workspace/apps/frontend/origin/federation.config.js:8:8)
at Module._compile (node:internal/modules/cjs/loader:1554:14)
at Object..js (node:internal/modules/cjs/loader:1706:10)
at Module.load (node:internal/modules/cjs/loader:1289:32)
at Function._load (node:internal/modules/cjs/loader:1108:12)
————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
NX Running target serve for project origin failed
Failed tasks:
- origin:serve
ELIFECYCLE Command failed with exit code 1.
I tried to follow this only thread on internet, but skip array didnot work. Thank you in advance. fabricjs
works fine in normal angular project.
本文标签: angularNX Cannot read properties of null (reading 39default39)Stack Overflow
版权声明:本文标题:angular - NX Cannot read properties of null (reading 'default') - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743797022a2540618.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论