Closed npomfret closed 1 year ago
AFAIK npm workspaces hoists al node modules to the root, so that would explain why there is no node_modules folder in your workspace packages, but it's been a while since I used it.
It seems to me like your problem is not related to isolate-package. What does your firebase.json file look like?
I also suggest creating a isolate.config.json and setting logLevel to "debug" as explained here
If you are still stuck you could send me a zip with your code to thijs@codecompose.com and I'll have a quick look.
I'm going to close this for now, assuming that your issue is not directly caused by isolate-package. Feel free to re-open if you have more info.
@0x80 I will add you to my repo if that's ok?
I've tried again, but was unable to get it work work. The 2nd attempt failed because the references in my tsconfig.json
contained a relative path to the shared code, like this:
...
"references": [
{
"path": "../path-to-shared-code"
}
]
When the files get moved to the isolate
dir, that path is no longer valid. Any help would be appreciated.
I'm having trouble getting this working within a project that uses npm workspace. I have a workspace defined in a
package.json
file at the root:And in the
firebase
directory I have afunctions
subdirectory (containing myfirebase.json
file). And insidepackages
there is a directory containing a typescript library calledshared-code
which is declared as a dependency in thepackage.json
file in the functions.When I run
npm install
in the root of the entire project, the result is that anode_modules
directory gets created at the root of the project, BUT there is nonode_modules
directory at all inside myfunctions
workspace.So when I run
firebase deploy ...
(insidefirebase/functions
) it fails immediately because there is nonode_modules
dir present. In my case withCannot find local ESLint!
.@0x80 Is there a solution?