Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows]_locales error: Path starts with "_" is preserved by the browser. #194

Open
xesam opened this issue Sep 20, 2024 · 2 comments
Open

Comments

@xesam
Copy link

xesam commented Sep 20, 2024

npm run dev fails on win11, what should i do to fix it?

win11

npm run dev error

> npm run dev

> [email protected] dev
> extension dev

✖︎✖︎✖︎ my-new-extension-32 compiled with errors in 1193 ms.
ERROR in [webpack-extension-target]
Path starts with "_" is preserved by the browser.
The browser will refuse to load this extension.
Please adjust your webpack configuration to remove that.
File(s) starts with "_":
    _locales\en\messages.json
    _locales\zh_CN\messages.json

but it works with npm run build ok

> npm run build
                                              
> [email protected] build                                          
> extension build                                                       
                                                                        
►►► my-new-extension-32 compiled successfully in 249 ms.
►►► Building my-new-extension-32 extension using Chrome defaults...

.
├─ _locales\zh_CN\messages.json (2.16KB)
├─ _locales\en\messages.json (2.15KB)
└─ manifest.json (0.19KB)

Version: 1.0
Size: 4.50KB
Build Target: Chrome
Build Status: Success

Build completed in 0.25 seconds.
►►► No errors or warnings found. Your extension is ready for deployment.

ubuntu

npm run dev ok

> npm run dev

> [email protected] dev
> extension dev

►►► my-new-extension-32 compiled successfully in 7876 ms.

npm run build ok

> npm run build

npm run build

> [email protected] build
> extension build

►►► my-new-extension-32 compiled successfully in 913 ms.
►►► Building my-new-extension-32 extension using Chrome defaults...

.
├─ _locales
│  ├─ zh_CN
│  │  └─ messages.json (2.16KB)
│  └─ en
│     └─ messages.json (2.15KB)
└─ manifest.json (0.19KB)

Version: 1.0
Size: 4.50KB
Build Target: Chrome
Build Status: Success

Build completed in 0.91 seconds.
►►► No errors or warnings found. Your extension is ready for deployment.
@cezaraugusto
Copy link
Member

hi @xesam could you share the folder structure you are using/sample extension so I can try to replicate locally? I did some changes in the locales field, seems worth adding more tests to it

@cezaraugusto
Copy link
Member

this is a message from an upstream dependency, so unless you do not have a folder starting with _ the message is expected. it works in production because the plugin works in dev mode only.

@cezaraugusto cezaraugusto self-assigned this Oct 1, 2024
@cezaraugusto cezaraugusto removed their assignment Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants