Yonom / assistant-ui

React Components for AI Chat 💬 🚀
https://www.assistant-ui.com
MIT License
1.85k stars 292 forks source link

npm error Unsupported URL Type "workspace:": workspace:* #903

Closed mmcc007 closed 1 month ago

mmcc007 commented 1 month ago

I'm a bit of a newby. So there may be an obvious fix for this.

npm install

npm error code EUNSUPPORTEDPROTOCOL
npm error Unsupported URL Type "workspace:": workspace:*
npm error A complete log of this run can be found in: /Users/mmccabe/.npm/_logs/2024-09-27T16_04_39_904Z-debug-0.log

It succeeds if I use

pnpm install

But it cannot find dependencies when running

npm run dev

> with-ffmpeg@0.1.0 dev
> next dev

  ▲ Next.js 14.2.13
  - Local:        http://localhost:3000
  - Environments: .env

 ✓ Starting...
 ✓ Ready in 3.8s
 ○ Compiling /_not-found ...
 ⨯ ./app/globals.css.webpack[javascript/auto]!=!../../node_modules/.pnpm/next@14.2.13_@opentelemetry+api@1.9.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!../../node_modules/.pnpm/next@14.2.13_@opentelemetry+api@1.9.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./app/globals.css
Error: Cannot find module '/Users/mmccabe/dev/github.com/Yonom/assistant-ui/examples/with-ffmpeg/node_modules/@assistant-ui/react/dist/tailwindcss/index.js'
Import trace for requested module:
./app/globals.css.webpack[javascript/auto]!=!../../node_modules/.pnpm/next@14.2.13_@opentelemetry+api@1.9.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!../../node_modules/.pnpm/next@14.2.13_@opentelemetry+api@1.9.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./app/globals.css
./app/globals.css
 ⨯ ./app/globals.css.webpack[javascript/auto]!=!../../node_modules/.pnpm/next@14.2.13_@opentelemetry+api@1.9.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!../../node_modules/.pnpm/next@14.2.13_@opentelemetry+api@1.9.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./app/globals.css
Error: Cannot find module '/Users/mmccabe/dev/github.com/Yonom/assistant-ui/examples/with-ffmpeg/node_modules/@assistant-ui/react/dist/tailwindcss/index.js'
Import trace for requested module:
./app/globals.css.webpack[javascript/auto]!=!../../node_modules/.pnpm/next@14.2.13_@opentelemetry+api@1.9.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!../../node_modules/.pnpm/next@14.2.13_@opentelemetry+api@1.9.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./app/globals.css
./app/globals.css
 ⨯ ./app/globals.css.webpack[javascript/auto]!=!../../node_modules/.pnpm/next@14.2.13_@opentelemetry+api@1.9.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!../../node_modules/.pnpm/next@14.2.13_@opentelemetry+api@1.9.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./app/globals.css
Error: Cannot find module '/Users/mmccabe/dev/github.com/Yonom/assistant-ui/examples/with-ffmpeg/node_modules/@assistant-ui/react/dist/tailwindcss/index.js'
Import trace for requested module:
./app/globals.css.webpack[javascript/auto]!=!../../node_modules/.pnpm/next@14.2.13_@opentelemetry+api@1.9.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!../../node_modules/.pnpm/next@14.2.13_@opentelemetry+api@1.9.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./app/globals.css
./app/globals.css
 GET /_next/static/webpack/134ca09dd4228248.webpack.hot-update.json 500 in 14544ms
 ⚠ Fast Refresh had to perform a full reload due to a runtime error.
 GET / 200 in 3518ms
 GET / 500 in 16ms

or

pnpm run dev

> with-ffmpeg@0.1.0 dev /Users/mmccabe/dev/github.com/Yonom/assistant-ui/examples/with-ffmpeg
> next dev

  ▲ Next.js 14.2.13
  - Local:        http://localhost:3000
  - Environments: .env

 ✓ Starting...
 ✓ Ready in 3.8s
 ○ Compiling / ...
 ⨯ ./app/globals.css.webpack[javascript/auto]!=!../../node_modules/.pnpm/next@14.2.13_@opentelemetry+api@1.9.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!../../node_modules/.pnpm/next@14.2.13_@opentelemetry+api@1.9.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./app/globals.css
Error: Cannot find module '/Users/mmccabe/dev/github.com/Yonom/assistant-ui/examples/with-ffmpeg/node_modules/@assistant-ui/react/dist/tailwindcss/index.js'
Import trace for requested module:
./app/globals.css.webpack[javascript/auto]!=!../../node_modules/.pnpm/next@14.2.13_@opentelemetry+api@1.9.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!../../node_modules/.pnpm/next@14.2.13_@opentelemetry+api@1.9.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./app/globals.css
./app/globals.css
 ⨯ ./app/globals.css.webpack[javascript/auto]!=!../../node_modules/.pnpm/next@14.2.13_@opentelemetry+api@1.9.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!../../node_modules/.pnpm/next@14.2.13_@opentelemetry+api@1.9.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./app/globals.css
Error: Cannot find module '/Users/mmccabe/dev/github.com/Yonom/assistant-ui/examples/with-ffmpeg/node_modules/@assistant-ui/react/dist/tailwindcss/index.js'
Import trace for requested module:
./app/globals.css.webpack[javascript/auto]!=!../../node_modules/.pnpm/next@14.2.13_@opentelemetry+api@1.9.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!../../node_modules/.pnpm/next@14.2.13_@opentelemetry+api@1.9.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./app/globals.css
./app/globals.css
 GET / 500 in 9896ms

The problem persists even if I explicitly install the dependencies, eg,

npm install @assistant-ui/react

npm error code EUNSUPPORTEDPROTOCOL
npm error Unsupported URL Type "workspace:": workspace:*
npm error A complete log of this run can be found in: /Users/mmccabe/.npm/_logs/2024-09-27T15_59_16_920Z-debug-0.log

or

pnpm install @assistant-ui/react

../..                                    |  WARN  `node_modules` is present. Lockfile only installation will make it out-of-date
 WARN  5 deprecated subdependencies found: @humanwhocodes/config-array@0.13.0, @humanwhocodes/object-schema@2.0.3, glob@7.2.3, inflight@1.0.6, rimraf@3.0.2
../..                                    | Progress: resolved 1060, reused 0, downloaded 0, added 0, done
Done in 13.9s

How do I fix this?

I'm getting this on many of the examples. Though I was able to get 'search-agent-for-ecommerce' to run.

mmcc007 commented 1 month ago

with-inline-suggestions is working!

Yonom commented 1 month ago

Hey, sorry about this! I'll look into making this simpler

baraich commented 1 month ago

@mmcc007, The project wasn't setup to use npm. workspace: * isn't supported by npm, it is a more of pnpm thing.

Yonom commented 1 month ago

Closing due to inactivity - let me know if you are still encountering issues