-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.topic: installationtopic: node-apiformerly `nApi`formerly `nApi`topic: windows
Description
Bug description
Following the Getting Started guide, when it gets to the point of running the "migrate dev" command, the script tries to install some packages through npm (don't know which ones) and this causes the error in title.
How to reproduce
- Follow the Getting started prisma guide up to and included the "npx prisma migrate dev --name init" command.
- Get the following error:
Environment variables loaded from .env
Prisma schema loaded from prisma\schema.prisma
Datasource "db": PostgreSQL database "testprisma", schema "public" at "localhost:5432"
PostgreSQL database testprisma created at localhost:5432
The following migration(s) have been created and applied from new schema changes:
migrations/
└─ 20210909080511_init/
└─ migration.sql
Your database is now in sync with your schema.
Running generate... (Use --skip-generate to skip the generators)
npm WARN hello-prisma@1.0.0 No description
npm WARN hello-prisma@1.0.0 No repository field.
npm ERR! code EPERM
npm ERR! syscall unlink
npm ERR! path C:\Users\mbelletti\Documents\Projects\hello-prisma\node_modules\prisma\query_engine-windows.dll.node
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\mbelletti\Documents\Projects\hello-prisma\node_modules\prisma\query_engine-windows.dll.node'
npm ERR! [OperationalError: EPERM: operation not permitted, unlink 'C:\Users\mbelletti\Documents\Projects\hello-prisma\node_modules\prisma\query_engine-windows.dll.node'] {
npm ERR! cause: [Error: EPERM: operation not permitted, unlink 'C:\Users\mbelletti\Documents\Projects\hello-prisma\node_modules\prisma\query_engine-windows.dll.node'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'C:\\Users\\mbelletti\\Documents\\Projects\\hello-prisma\\node_modules\\prisma\\query_engine-windows.dll.node'
npm ERR! },
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'C:\\Users\\mbelletti\\Documents\\Projects\\hello-prisma\\node_modules\\prisma\\query_engine-windows.dll.node',
npm ERR! parent: 'hello-prisma'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\mbelletti\AppData\Roaming\npm-cache\_logs\2021-09-09T08_05_23_557Z-debug.log
Error: Command failed with exit code 4294963248: npm install -D prisma@3.0.1
The batch file cannot be found.
The log file is the following:
2021-09-09T08_05_23_557Z-debug.log
After this, the node_modules.bin directory no longer has the prisma executable, and the node_modules/prisma folder only contains the file that npm wasn't able to remove (query_engine-windows.dll.node).
Expected behavior
The script finishes correctly.
Prisma information
All the prisma configurations are the ones taken from the guide.
Environment & setup
- OS: Windows 10
- Database: PostgreSQL 13
- Node.js version: 14.17.1 (using nvm)
Prisma Version
Environment variables loaded from .env
prisma : 3.0.1
@prisma/client : Not found
Current platform : windows
Query Engine (Node-API) : libquery-engine 2452cc6313d52b8b9a96999ac0e974d0aedf88db (at node_modules\@prisma\engines\query_engine-windows.dll.node)
Migration Engine : migration-engine-cli 2452cc6313d52b8b9a96999ac0e974d0aedf88db (at node_modules\@prisma\engines\migration-engine-windows.exe)
Introspection Engine : introspection-core 2452cc6313d52b8b9a96999ac0e974d0aedf88db (at node_modules\@prisma\engines\introspection-engine-windows.exe)
Format Binary : prisma-fmt 2452cc6313d52b8b9a96999ac0e974d0aedf88db (at node_modules\@prisma\engines\prisma-fmt-windows.exe)
Default Engines Hash : 2452cc6313d52b8b9a96999ac0e974d0aedf88db
Studio : 0.423.0
(I had to relaunch npm install to get prisma back)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.topic: installationtopic: node-apiformerly `nApi`formerly `nApi`topic: windows