-
Notifications
You must be signed in to change notification settings - Fork 90
Closed
Labels
maintenanceChange related to maintaining TutorialKitChange related to maintaining TutorialKitwindowsIssue releated specifically to WindowsIssue releated specifically to Windows
Description
Describe the bug
I tried adding some docs, but can't seem to get the environment working
Link to a StackBlitz project which shows the error
No response
Steps to reproduce
Tried both on windows and wsl
git clone https://github.com/stackblitz/tutorialkit
cd tutorialkit
pnpm i
cd docs
npm run dev
I get on wsl:
noam@Win11:~/repos/tutorialkit/docs$ pnpm run dev
pnpm run dev
> @ dev /home/noam/repos/tutorialkit
> TUTORIALKIT_DEV=true pnpm -r --parallel --stream --filter='./packages/**' run dev
Scope: 9 of 15 workspace projects
packages/astro dev$ node ./scripts/build.js --watch
packages/react dev$ node ./scripts/build.js --watch
packages/runtime dev$ pnpm run build --watch --preserveWatchOutput
packages/template dev$ astro dev
packages/theme dev$ pnpm run build --watch --preserveWatchOutput
packages/types dev$ pnpm run build --watch --preserveWatchOutput
packages/astro dev: 9:36:51 AM - Starting compilation in watch mode...
packages/react dev: 9:36:51 AM - Starting compilation in watch mode...
packages/runtime dev: > @tutorialkit/[email protected] build /home/noam/repos/tutorialkit/packages/runtime
packages/runtime dev: > tsc -b tsconfig.build.json "--watch" "--preserveWatchOutput"
packages/theme dev: > @tutorialkit/[email protected] build /home/noam/repos/tutorialkit/packages/theme
packages/theme dev: > tsc -b "--watch" "--preserveWatchOutput"
packages/types dev: > @tutorialkit/[email protected] build /home/noam/repos/tutorialkit/packages/types
packages/types dev: > tsc -b tsconfig.build.json "--watch" "--preserveWatchOutput"
packages/runtime dev: 9:36:52 AM - Starting compilation in watch mode...
packages/theme dev: 9:36:52 AM - Starting compilation in watch mode...
packages/types dev: 9:36:52 AM - Starting compilation in watch mode...
packages/template dev: 9:36:52 AM [vite] Pre-transform error: Failed to resolve entry for package "@tutorialkit/theme". The package may have incorrect main/module/exports specified in its package.json.
packages/template dev: 9:36:52 AM [vite] Error when evaluating SSR module /home/noam/repos/tutorialkit/packages/template/astro.config.ts:
packages/template dev: |- Error: Failed to resolve entry for package "@tutorialkit/theme". The package may have incorrect main/module/exports specified in its package.json.
packages/template dev: at packageEntryFailure (file:///home/noam/repos/tutorialkit/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:46541:15)
packages/template dev: at resolvePackageEntry (file:///home/noam/repos/tutorialkit/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:46538:3)
packages/template dev: at tryNodeResolve (file:///home/noam/repos/tutorialkit/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:46354:16)
packages/template dev: at ResolveIdContext.resolveId (file:///home/noam/repos/tutorialkit/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:46104:19)
packages/template dev: at PluginContainer.resolveId (file:///home/noam/repos/tutorialkit/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:48919:17)
packages/template dev: at async TransformPluginContext.resolve (file:///home/noam/repos/tutorialkit/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:49079:15)
packages/template dev: at async normalizeUrl (file:///home/noam/repos/tutorialkit/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:63929:26)
packages/template dev: at async file:///home/noam/repos/tutorialkit/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:64068:39
packages/template dev: at async Promise.all (index 8)
packages/template dev: at async TransformPluginContext.transform (file:///home/noam/repos/tutorialkit/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:63995:7)
packages/template dev: [astro] Unable to load your Astro config
packages/template dev: Failed to resolve entry for package "@tutorialkit/theme". The package may have incorrect main/module/exports specified in its package.json.
packages/template dev: Stack trace:
packages/template dev: at packageEntryFailure (file:///home/noam/repos/tutorialkit/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:46541:15)
packages/template dev: at tryNodeResolve (file:///home/noam/repos/tutorialkit/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:46354:16)
packages/template dev: at PluginContainer.resolveId (file:///home/noam/repos/tutorialkit/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:48919:17)
packages/template dev: at async normalizeUrl (file:///home/noam/repos/tutorialkit/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:63929:26)
packages/template dev: at async Promise.all (index 8)
packages/template dev: Failed
/home/noam/repos/tutorialkit/packages/template:
ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL [email protected] dev: `astro dev`
Exit status 1
ELIFECYCLE Command failed with exit code 1.
noam@Win11:~/repos/tutorialkit/docs$
And on windows:
C:\repos\tutorialkit\docs\tutorialkit.dev>npm run dev
> [email protected] dev
> astro dev
node:internal/modules/esm/resolve:304
return new ERR_PACKAGE_PATH_NOT_EXPORTED(
^
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in C:\repos\tutorialkit\docs\tutorialkit.dev\node_modules\@tutorialkit\theme\package.json
at exportsNotFound (node:internal/modules/esm/resolve:304:10)
at packageExportsResolve (node:internal/modules/esm/resolve:594:13)
at resolveExports (node:internal/modules/cjs/loader:592:36)
at Module._findPath (node:internal/modules/cjs/loader:669:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:1131:27)
at Function.resolve (node:internal/modules/helpers:190:19)
at _resolve (C:\repos\tutorialkit\node_modules\.pnpm\[email protected]\node_modules\jiti\dist\jiti.js:1:241814)
at jiti (C:\repos\tutorialkit\node_modules\.pnpm\[email protected]\node_modules\jiti\dist\jiti.js:1:244531)
at C:/repos/tutorialkit/docs/tutorialkit.dev/uno.config.ts:1:176
at evalModule (C:\repos\tutorialkit\node_modules\.pnpm\[email protected]\node_modules\jiti\dist\jiti.js:1:247313)
at jiti (C:\repos\tutorialkit\node_modules\.pnpm\[email protected]\node_modules\jiti\dist\jiti.js:1:245241)
at loadConfigFile (file:///C:/repos/tutorialkit/node_modules/.pnpm/[email protected]/node_modules/unconfig/dist/index.mjs:177:13)
at async Object.load (file:///C:/repos/tutorialkit/node_modules/.pnpm/[email protected]/node_modules/unconfig/dist/index.mjs:98:24)
at async loadConfig (file:///C:/repos/tutorialkit/node_modules/.pnpm/@[email protected]/node_modules/@unocss/config/dist/index.mjs:43:18)
at async reloadConfig (file:///C:/repos/tutorialkit/node_modules/.pnpm/@[email protected][email protected]/node_modules/@unocss/vite/dist/index.mjs:93:20) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
Node.js v20.14.0
C:\repos\tutorialkit\docs\tutorialkit.dev>
Expected behavior
Wanted it to work :)
p.s.
It also required me to install a specific version of pnpm - 8.15.6 - otherwise pnpm i failed (at least on windows)
Screenshots
No response
Platform
- TutorialKit version: [e.g. 1.0.1]
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Version: [e.g. 91.1]
Additional context
No response
Metadata
Metadata
Assignees
Labels
maintenanceChange related to maintaining TutorialKitChange related to maintaining TutorialKitwindowsIssue releated specifically to WindowsIssue releated specifically to Windows