Comments (2)
Apparently the problem are not monorepos but PNPM.
I made a new reproduction here :
https://github.com/Alexandre-Fernandez/astro-i18next-issue-48
If you install with npm install
it works, but if you install with pnpm install
you get the module not defined
error.
Workaround
Add this file to your root :
/.npmrc
public-hoist-pattern[]="*deepmerge*"
public-hoist-pattern[]="*proload*"
public-hoist-pattern[]="*locale-emoji*"
https://pnpm.io/npmrc#public-hoist-pattern
from astro-i18next.
While I haven't used the module yet, I'm a big fan of both astro and pnpm so I had a quick look at the source.
First thing I notice is these 2 imports:
cli/utils.ts:import { AstroI18nextConfig } from "types";
cli/generate.ts:import { AstroI18nextConfig } from "types";
Both should probably import from "./types" (or ./types.ts - I never know if the extension is required).
Other than that, I see these imports, all from dev deps. Probably should be regular deps:
cli/utils.ts:import { fdir, PathsOutput } from "fdir"; // dev dep
index.ts:import { AstroIntegration } from "astro"; // dev dep
cli/middlewares.ts:import { MiddlewareFunction } from "yargs"; // dev dep
cli/index.ts:import yargs from "yargs"; // dev dep
cli/index.ts:import { hideBin } from "yargs/helpers"; // dev dep
cli/utils.ts:import fsExtra from "fs-extra"; // dev dep
cli/utils.ts:import ts from "typescript"; // dev dep
With those fixes, pnpm might be happy without resorting to public-hoist-patterns
.
from astro-i18next.
Related Issues (20)
- Does changing language make the public folder innacessible?
- Is the project still maintained? HOT 6
- TypeScript error "Could not find a declaration file for module" HOT 2
- An exception occurred when executing the command 'npx astro-i18next generate'
- After I ran the npx astro-i18next generate command, my .tsx file and .scss file are missing!
- error when using astro-i18next Trans component HOT 9
- Cannot read properties of undefined (reading 'map') in LanguageSelector component. HOT 1
- How to get current language in astro-i18next? HOT 2
- Is there any way to ignore specific page being generated?
- please support cloudflare HOT 2
- Noob question but, how to make this work with a collection? HOT 1
- Ignore 404.astro when run `npx astro-i18next generate` HOT 1
- Working with markdown pages (.md) HOT 4
- Can you interpolate dynamic values with the Trans component?
- Modify LanguageSelector HOT 1
- Dont change default files with the npx astro-i18next generate
- The types for the config file in ts dont work
- Is this lib died? HOT 1
- Namespace validation
- Error with npx astro-i18n generate
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from astro-i18next.