Open MA-Jesse opened 2 years ago
So from some further investigation, it appears to be caused by one of our fireDependencies
"fireDependencies": {
"@claimsgate/core": "../core",
"@claimsgate/core-types": "../core-types"
},
Removing @claimsgate/core
from our fireDependencies prevents the issue from happening. But looking further into it, there are almost no differences between the @claimsgate/core
and @claimsgate/core-types
folders.
Removing node_modules
from @claimsgate/core
appears to fix the issue but this is odd. The only dependencies for @claimsgate/core
are "@claimsgate/core-types": "1.2.0"
.
In our fireConfig
we also exclude the node_modules
folder. Potentially, there is some permission issue when reading/writing to the node_modules
in packages/core
from packages/functions
To summarise:
node_modules
from @claimsgate/core
causes Firelink to start working correctly.@claimsgate/core
has been enabling eslint
{
"name": "@claimsgate/core",
"version": "1.2.0",
"description": "",
"scripts": {
"compile": "npx tsc",
"compile:watch": "npx tsc -w"
},
"keywords": [],
"main": "dist/index.js",
"types": "dist/index.d.ts",
"author": "",
"dependencies": {
"@claimsgate/core-types": "1.2.0",
"@typescript-eslint/eslint-plugin": "^5.16.0",
"@typescript-eslint/parser": "^5.16.0"
},
"devDependencies": {
"eslint": "^8.11.0",
"typescript": "^4.5.4"
},
"private": true
}
{
"compilerOptions": {
"module": "commonjs",
"allowSyntheticDefaultImports": true,
"suppressImplicitAnyIndexErrors": true,
"forceConsistentCasingInFileNames": true,
"sourceMap": true,
"declaration": true,
"strict": false,
"esModuleInterop": true,
"allowJs": false,
"baseUrl": "./src",
"outDir": "dist",
"target": "es2020",
"composite": true,
"types": ["@claimsgate/core-types"],
"paths": {}
},
"references": [{ "path": "../core-types" }],
"exclude": ["node_modules", "**/*.spec.ts", "./dist"],
"include": ["src/**/*.ts"],
"files": ["index.ts"]
}
{
"fireDependencies": {
"@claimsgate/core-types": "../core-types",
"@claimsgate/core": "../core"
},
"fireConfig": {
"runner": "firebase",
"outFolderName": ".packages",
"outFolderLocation": ".",
"excludes": [
"node_modules"
]
}
}
Okay I figured it out. Removing @claimsgate/core
from no-hoist
in our root package.json
solved the problem!
I'm guessing there's an error in resolving the directory of node_modules
somewhere in the code when dependencies are hoisted for a given fireDependency
Wow thanks for the great information provided i will try to replicate the issue and see what causes it
Is your project started with some Yarn or Lerna starter if it is possible to clone it directly and test the things out ?
Anyway i will try to mimic the problem using your provided information in this ticket for now.
Great job guys!
We're using a mono-repo with yarn workspaces and lerna. We have no-hoist enabled for packages/functions so all node_modules related to packages/functions are contained there.
When running firelink from to packages/functions we get this error....
Not sure why but running firelink from the root directory of the repo doesn't throw this error.