Setting up Plasmo manually

I'm trying to migrate an extension to the framework but even after installing all the dependencies I seemingly need, I get an error
šŸ”“ ERROR | r.map is not a function
šŸŸ” 5 | TypeError: r.map is not a function
at file:///C:/repositories/extensions/youtube-like-dislike-shortcut/node_modules/.pnpm/[email protected][email protected]/node_modules/plasmo/dist/index.js:150:14351
šŸ”“ ERROR | r.map is not a function
šŸŸ” 5 | TypeError: r.map is not a function
at file:///C:/repositories/extensions/youtube-like-dislike-shortcut/node_modules/.pnpm/[email protected][email protected]/node_modules/plasmo/dist/index.js:150:14351
In the package.json:
{
"dependencies": {
"@mdi/js": "^7.2.96",
"@plasmohq/storage": "^1.5.0",
"plasmo": "^0.70.1",
"sass": "^1.62.1",
"svelte": "^3.59.1",
"svelte-preprocess": "^5.0.3"
},
"devDependencies": {
"@plasmohq/prettier-plugin-sort-imports": "^3.6.4",
"@sveltejs/eslint-config": "github:sveltejs/eslint-config",
"@types/chrome": "^0.0.235",
"@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^5.59.2",
"autoprefixer": "^10.4.14",
"eslint": "^8.40.0",
"eslint-config-avi12": "github:avi12/eslint-config-avi12",
"eslint-plugin-svelte3": "^4.0.0",
"postcss": "^8.4.23",
"prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.10.0",
"tailwindcss": "^3.3.2",
"typescript": "^5.0.4",
"web-ext": "^7.6.2",
"zip-self": "^0.5.6"
}
}
{
"dependencies": {
"@mdi/js": "^7.2.96",
"@plasmohq/storage": "^1.5.0",
"plasmo": "^0.70.1",
"sass": "^1.62.1",
"svelte": "^3.59.1",
"svelte-preprocess": "^5.0.3"
},
"devDependencies": {
"@plasmohq/prettier-plugin-sort-imports": "^3.6.4",
"@sveltejs/eslint-config": "github:sveltejs/eslint-config",
"@types/chrome": "^0.0.235",
"@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^5.59.2",
"autoprefixer": "^10.4.14",
"eslint": "^8.40.0",
"eslint-config-avi12": "github:avi12/eslint-config-avi12",
"eslint-plugin-svelte3": "^4.0.0",
"postcss": "^8.4.23",
"prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.10.0",
"tailwindcss": "^3.3.2",
"typescript": "^5.0.4",
"web-ext": "^7.6.2",
"zip-self": "^0.5.6"
}
}
I also have
- prettierrc.cjs
- postcss.config.js
- svelte.config.js
- tailwind.config.js
- prettierrc.cjs
- postcss.config.js
- svelte.config.js
- tailwind.config.js
12 Replies
Avi
AviOPā€¢2y ago
If I have absolutely no choice< I will simply create a new Plasmo project and copy over the .git/
lab
labā€¢2y ago
that's some weird error :d maybe there's an undefined array not being handled in the cli
Avi
AviOPā€¢2y ago
It seems like Plasmo didn't like
{
"manifest": {
"web_accessible_resources": [
{
"resources": "assets/*",
"matches": [
"<all_urls>"
]
}
]
}
}
{
"manifest": {
"web_accessible_resources": [
{
"resources": "assets/*",
"matches": [
"<all_urls>"
]
}
]
}
}
lab
labā€¢2y ago
hmm prob use another directory or is there any assets inside that dir?
Avi
AviOPā€¢2y ago
OH it should've been
{
"manifest": {
"web_accessible_resources": [
{
"resources": [
"assets/*"
],
"matches": [
"<all_urls>"
]
}
]
}
}
{
"manifest": {
"web_accessible_resources": [
{
"resources": [
"assets/*"
],
"matches": [
"<all_urls>"
]
}
]
}
}
šŸ¤­
lab
labā€¢2y ago
oh yeah it's an array yeah this is calling for that
Avi
AviOPā€¢2y ago
Better verify the manifest keys next time šŸ˜‚
lab
labā€¢2y ago
plasmo.config.ts feature your editor would be bright red with ts err I haven't got time to sit down for that recently tho xd
Avi
AviOPā€¢2y ago
That's a good one
lab
labā€¢2y ago
but one day
Avi
AviOPā€¢2y ago
It reminds me, some users suffer from the private class members shit in @plasmohq/storage
Avi
AviOPā€¢2y ago
GitHub
[Bug] YTHD popup menu is broken on Firefox 78 Ā· Issue #74 Ā· avi12/y...
Describe the bug Using youtube auto hd with Firefox V78.15 for many months. Worked great. As seen in the screenshot attached, the menu no longer appears functional and the extension no longer works...
Want results from more Discord servers?
Add your server