Closed bjornharvold closed 3 months ago
Thanks @bjornharvold, I'm unable to reproduce this issue.
Here's my log
nvm install 22.5.1
Downloading and installing node v22.5.1...
Downloading https://nodejs.org/dist/v22.5.1/node-v22.5.1-darwin-arm64.tar.xz...
######################################################################### 100.0%
Computing checksum with shasum -a 256
Checksums matched!
Now using node v22.5.1 (npm v10.8.2)
$npx create-nx-workspace@latest nx-1957-analog
Need to install the following packages:
create-nx-workspace@19.5.7
Ok to proceed? (y)
NX Let's create a new workspace [https://nx.dev/getting-started/intro]
β Which stack do you want to use? Β· angular
β Integrated monorepo, or standalone project? Β· integrated
β Application name Β· my-app
β Which bundler would you like to use? Β· esbuild
β Default stylesheet format Β· css
β Do you want to enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering)? Β· No
β Test runner to use for end to end (E2E) tests Β· playwright
β Which CI provider would you like to use? Β· skip
β Would you like remote caching to make your build faster? Β· skip
NX Creating your v19.5.7 workspace.
β Installing dependencies with npm
β Successfully created the workspace: nx-1957-analog.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
NX First time using Nx? Check out this interactive Nx tutorial.
https://nx.dev/angular-tutorial/1-code-generation
$cd nx-1957-analog
$npm i @analogjs/platform --save-dev
npm warn deprecated npmlog@5.0.1: This package is no longer supported.
npm warn deprecated are-we-there-yet@2.0.0: This package is no longer supported.
npm warn deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported
npm warn deprecated gauge@3.0.2: This package is no longer supported.
added 282 packages, removed 14 packages, changed 8 packages, and audited 1784 packages in 33s
257 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
$nx g @analogjs/platform:app docs
NX Generating @analogjs/platform:app
β Add TailwindCSS for styling? (y/N) Β· false
β Add tRPC for typesafe client/server interaction? (y/N) Β· false
UPDATE package.json
CREATE apps/docs/project.json
CREATE apps/docs/.eslintrc.json
CREATE apps/docs/index.html
CREATE apps/docs/package.json
CREATE apps/docs/public/.gitkeep
CREATE apps/docs/public/analog.svg
CREATE apps/docs/public/favicon.ico
CREATE apps/docs/src/app/app.component.spec.ts
CREATE apps/docs/src/app/app.component.ts
CREATE apps/docs/src/app/app.config.server.ts
CREATE apps/docs/src/app/app.config.ts
CREATE apps/docs/src/main.server.ts
CREATE apps/docs/src/main.ts
CREATE apps/docs/src/server/routes/v1/hello.ts
CREATE apps/docs/src/styles.css
CREATE apps/docs/src/test-setup.ts
CREATE apps/docs/src/vite-env.d.ts
CREATE apps/docs/tsconfig.app.json
CREATE apps/docs/tsconfig.editor.json
CREATE apps/docs/tsconfig.json
CREATE apps/docs/tsconfig.spec.json
CREATE apps/docs/vite.config.ts
CREATE apps/docs/src/app/pages/(home).page.ts
CREATE apps/docs/src/app/pages/analog-welcome.component.ts
added 116 packages, removed 3 packages, changed 6 packages, and audited 1897 packages in 6s
285 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Does it work for you with a new workspace?
Hi @brandonroberts
It broke right here:
if (!nxVersion) {
throw new Error((0, devkit_1.stripIndents) `Nx must be installed to execute this plugin`);
}
Older versions of Nx does not install the "nx" dev dependency by default which your library is expecting.
Added it and projects generates as expected.
Cheers, Bjorn
Please provide the environment you discovered this bug in.
Which area/package is the issue in?
platform
Description
Hi Brandon + Team π¦ΈπΎββοΈ
We have a Nx monorepo with a standard project layout:
root
Please provide the exception or error you saw