quiet-electrician-41149
08/24/2022, 8:07 AMwonderful-jewelry-41731
08/24/2022, 11:46 AMwith-jest
as a starter to try jest, it works fine until I import a class where i'm importing @plasmo/storage
here is the error:
src/tests/bg/tabs.test.ts
● Test suite failed to run
Cannot find module '@plasmohq/storage' from 'src/bg/local-storage.ts'
Require stack:
src/bg/local-storage.ts
src/bg/tabs.ts
src/tests/bg/tabs.test.ts
> 1 | import { Storage } from "@plasmohq/storage"
| ^
2 |
3 | /*
4 | Cache: chrome.storage.local
at Resolver._throwModNotFoundError (node_modules/.pnpm/jest-resolve@28.1.3/node_modules/jest-resolve/build/resolver.js:491:11)
at Object.<anonymous> (src/bg/local-storage.ts:1:1)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 8.707 s
Ran all test suites.
ELIFECYCLE Test failed. See above for more details.
I think jest is trying to import the package from src
as in the config file we have :
moduleNameMapper: pathsToModuleNameMapper(tsconfig.compilerOptions.paths, {
prefix: "<rootDir>/"
}),
How can I fix this ?quiet-engine-70935
08/24/2022, 11:46 AMquiet-electrician-41149
08/30/2022, 4:37 PMthousands-horse-90118
08/31/2022, 2:25 AMUncaught TypeError: Cannot read properties of undefined (reading 'fetch')
. The offending line is the following: exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableStream);
Note, the error does not occur in the production build, so I do suspect the issue is build / framework related.flat-state-13182
09/01/2022, 3:25 PMoptions.tsx
file into my project it creates a blank page.
The console logs for the option page show that there is an issue importing React, so I guess this is another issue caused due to my particular project setup using a relative import for react in my package.json
, but it would be nice to work around it somehow.rhythmic-machine-85586
09/01/2022, 6:19 PMquiet-electrician-41149
09/02/2022, 12:18 AMchrome.runtime.onInstalled.addListener(function (){
chrome.tabs.create({url:chrome.extension.getURL("options.html")},function(){})
})
quiet-electrician-41149
09/02/2022, 12:38 AM🟣 Plasmo Browser Platform Publish v2
🟡 QUEUE | Prepare for chrome submission
Error: 🔴 ERROR | Error: chrome: Step 1) Item ""_____" (myname)": Response code 400 (Bad Request)
Anything I can do to debug thisbig-cpu-76306
09/02/2022, 10:27 PMquiet-engine-70935
09/02/2022, 10:27 PMthousands-horse-90118
09/02/2022, 11:48 PMpackage.json
that looks like this:
"web_accessible_resources": [
{
"resources": ["_favicon/*"],
"matches": [
"http://localhost:3000/*",
"https://*.mydomain.co/*",
"https://mydomain.co/*"
]
}
]
However when I run dev
or build
the manifest that gets generated seems to overwrite the resources key with an empty array ({"resources": []}
) . One thing to note is that there are no files that match this path, in my bundler I'm generating those URLs at runtime the the chrome.runtime.getURL()
call.quiet-electrician-41149
09/03/2022, 12:11 AMquiet-electrician-41149
09/03/2022, 1:56 AMtabs
permission? Is it because I have newtab.tsx
? I don't think you need the tabs
permission to replace the new tab. In fact the tabs
permission adds the message Read your browsing history
which makes my app sound pretty susquiet-electrician-41149
09/05/2022, 7:21 PMtabs
permission requested when my app doesn't use it) and google tag manager not workingmost-florist-42787
09/14/2022, 3:41 PMbusy-greece-52941
09/15/2022, 2:19 PMquiet-engine-70935
09/15/2022, 2:19 PMmost-florist-42787
09/16/2022, 5:52 AMwonderful-jewelry-41731
09/16/2022, 8:05 AMmost-florist-42787
09/16/2022, 10:00 AMquaint-rainbow-21282
09/16/2022, 12:38 PMquaint-rainbow-21282
09/16/2022, 12:41 PMdelightful-grass-89815
09/17/2022, 7:11 AMquaint-rainbow-21282
09/17/2022, 10:18 AMbusy-greece-52941
09/18/2022, 1:50 PMquiet-electrician-41149
09/19/2022, 4:04 AM@plasmohq/storage
library? I noticed that some of the time the writes to the storage arent going throughambitious-restaurant-41333
09/21/2022, 6:50 PMshell
pnpm dlx plasmo init
I get
WARN The package linked to "..\..\..\Users\avi12\AppData\Local\pnpm\store\v3\tmp\dlx-41756\node_modules\.pnpm\@parcel+watcher@2.0.5\node_modules\@parcel\watcher" had files with invalid names: ... They were renamed.
ENOENT ENOENT: no such file or directory, copyfile 'C:\Users\avi12\AppData\Local\pnpm\store\v3\files\a5\f0f964db2a4ce7565c73cc56b239fd42519521e6e6daaf746531883b9e89af9724747deff0e577d77702f98be70f153ad21684197d2cd3f3c01193c37844a0
' -> 'C:\Users\avi12\AppData\Local\pnpm\store\v3\tmp\dlx-41756\node_modules\.pnpm\@parcel+watcher@2.0.5\node_modules\@parcel\_tmp_41756_49360b514f6cd3363d7ade7ab63d6ca0\node_modules.binnode-gyp-build-test'
ambitious-restaurant-41333
09/23/2022, 11:17 AMambitious-restaurant-41333
09/24/2022, 10:22 AM@plasmohq/storage
is React-specific