Great package. But, ran into this while playing with firelink for the first time.
I have a mono-repo where @zfalen/some-package refers to an npm workspace at packages/some-totally-different-folder-name.
The root package.json looks like this
{
"name": "@zfalen/my-repo-root-package",
"author": "Zach Falen",
"version": "1.0.0",
"license": "ISC",
"private": true,
"devDependencies": { ...... },
"workspaces": [
"packages/*",
"firebase-app/functions"
]
}
The packages/some-totally-different-folder-name/packages.json looks like
{
"name": "@zfalen/some-package",
"author": "Zach Falen",
"version": "1.0.1",
// .... rest of it
}
Then, in firebase-app/functions/package.json we have
{
"name": "functions",
"dependencies": {
"@zfalen/some-package": "^1.0.0",
// .......
},
"fireDependencies": {
"@zfalen/some-package": "../../packages/some-totally-different-folder-name"
},
// .... rest of it
}
firelink deploy grabs my module and dumps it into firebase-app/functions/.packages/some-totally-different-folder-name - HOWEVER it patches the dependency to read "@zfalen/some-package": "file:./.packages/some-package".
While this weirdly worked out locally testing against the emulator, it resulted in a failure on deploying to Firebase. That error was predictably:
Detailed stack trace: Error: Cannot find module '@zfalen/some-package'
I updated the name of the folder to match the name of some-package, and updated the path under fireDependencies, which made it work.
TLDR; Readme should reflect the requirement that folder names match package names, or script should use the correct folder name when mapping the file:./.packages/whatever in package.json :)
Great package. But, ran into this while playing with
firelinkfor the first time.I have a mono-repo where
@zfalen/some-packagerefers to annpmworkspace atpackages/some-totally-different-folder-name.The root
package.jsonlooks like thisThe
packages/some-totally-different-folder-name/packages.jsonlooks likeThen, in
firebase-app/functions/package.jsonwe havefirelink deploygrabs my module and dumps it intofirebase-app/functions/.packages/some-totally-different-folder-name- HOWEVER it patches the dependency to read"@zfalen/some-package": "file:./.packages/some-package".While this weirdly worked out locally testing against the emulator, it resulted in a failure on deploying to Firebase. That error was predictably:
Detailed stack trace: Error: Cannot find module '@zfalen/some-package'I updated the name of the folder to match the name of
some-package, and updated the path underfireDependencies, which made it work.TLDR; Readme should reflect the requirement that folder names match package names, or script should use the correct folder name when mapping the
file:./.packages/whateverinpackage.json:)