This repository was archived by the owner on Jul 10, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 335
This repository was archived by the owner on Jul 10, 2023. It is now read-only.
Bug: The requested module '/node_modules/.vite/deps/medusa-react.js' does not provide an export named 'useAdminAddLocationToSalesChannel' #924
Copy link
Copy link
Open
Description
Hello,
I'm running an application in a Docker container based on the repository https://github.com/medusajs/docker-medusa. After installing the admin module from https://github.com/medusajs/admin, I'm getting the following error:
Unexpected Application Error!
The requested module '/node_modules/.vite/deps/medusa-react.js?v=c2e74af3' does not provide an export named 'useAdminAddLocationToSalesChannel'
SyntaxError: The requested module '/node_modules/.vite/deps/medusa-react.js?v=c2e74af3' does not provide an export named 'useAdminAddLocationToSalesChannel'
💿 Hey developer 👋
You can provide a way better UX than this when your app throws errors by providing your own ErrorBoundary prop on <Route>
I've tried cloning the admin repository and using
Dockerfile
FROM node:18.15.0
EXPOSE 7000
WORKDIR /app/admin
COPY package*.json ./
RUN rm -rf node_modules
RUN apt-get update
RUN npm install -g npm@latest
COPY . .
RUN npm install --force
RUN npm run build &> /dev/null
COPY develop.sh .
ENTRYPOINT ["./develop.sh", "develop"]
develop.sh
#!/bin/bash
medusa user -e [email protected] -p some-password
npm run $1
Docker Logs
2023-04-06 11:10:11
2023-04-06 11:10:11 > [email protected] develop
2023-04-06 11:10:11 > npm run dev
2023-04-06 11:10:11
2023-04-06 11:10:11
2023-04-06 11:10:11 > [email protected] dev
2023-04-06 11:10:11 > vite --port 7000 --host
2023-04-06 11:10:11
2023-04-06 11:10:12
2023-04-06 11:10:12 VITE v4.2.1 ready in 470 ms
2023-04-06 11:10:12
2023-04-06 11:10:12 ➜ Local: http://localhost:7000/
2023-04-06 11:10:12 ➜ Network: http://172.20.0.6:7000/
2023-04-06 11:10:10 ./develop.sh: line 3: medusa: command not found
2023-04-06 11:10:17 2:10:17 PM [vite] error while updating dependencies:
2023-04-06 11:10:17 Error: ENOENT: no such file or directory, rename '/app/admin/node_modules/.vite/deps_temp_943c5659' -> '/app/admin/node_modules/.vite/deps'
2023-04-06 11:10:17 at renameSync (node:fs:1040:3)
2023-04-06 11:10:17 at Object.commit (file:///app/admin/node_modules/vite/dist/node/chunks/dep-79892de8.js:44685:19)
2023-04-06 11:10:17 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-04-06 11:10:17 at async commitProcessing (file:///app/admin/node_modules/vite/dist/node/chunks/dep-79892de8.js:44144:17)
2023-04-06 11:10:17 at async runOptimizer (file:///app/admin/node_modules/vite/dist/node/chunks/dep-79892de8.js:44182:17)
Version:
medusa-starter-default: 0.0.1
Medusa Admin: 0.1.0
Medusa-React: ^4.0.4
Node: LTS 18.15.0
NPM: Latest
I believe there may be a bug with the admin module, and I wanted to report it so it can be fixed. Additionally, I received a suggestion to provide a custom ErrorBoundary prop on to improve the UX when the app throws errors.
Thank you for your attention to this issue.
Metadata
Metadata
Assignees
Labels
No labels
