Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: recreated lock file to fix windows vite issues #76

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

sebastien-comeau
Copy link
Contributor

Followed the steps described here to fix windows vite following errors:

$ npm run test:unit

> test:unit
> vitest

C:\data\projects\DTS-STN\canadian-dental-care-plan\frontend\node_modules\vite\node_modules\rollup\dist\native.js:87
                throw new Error(
                      ^

Error: Cannot find module @rollup/rollup-win32-x64-msvc. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
    at requireWithFriendlyError (C:\data\projects\DTS-STN\canadian-dental-care-plan\frontend\node_modules\vite\node_modules\rollup\dist\native.js:87:9)
    at Object.<anonymous> (C:\data\projects\DTS-STN\canadian-dental-care-plan\frontend\node_modules\vite\node_modules\rollup\dist\native.js:96:48)
    ... 3 lines matching cause stack trace ...
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at cjsLoader (node:internal/modules/esm/translators:345:17)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:294:7)
    at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24) {
  [cause]: Error: Cannot find module '@rollup/rollup-win32-x64-msvc'
  Require stack:
  - C:\data\projects\DTS-STN\canadian-dental-care-plan\frontend\node_modules\vite\node_modules\rollup\dist\native.js
      at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
      at Module._load (node:internal/modules/cjs/loader:985:27)
      at Module.require (node:internal/modules/cjs/loader:1235:19)
      at require (node:internal/modules/helpers:176:18)
      at requireWithFriendlyError (C:\data\projects\DTS-STN\canadian-dental-care-plan\frontend\node_modules\vite\node_modules\rollup\dist\native.js:69:10)
      at Object.<anonymous> (C:\data\projects\DTS-STN\canadian-dental-care-plan\frontend\node_modules\vite\node_modules\rollup\dist\native.js:96:48)
      at Module._compile (node:internal/modules/cjs/loader:1376:14)
      at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
      at Module.load (node:internal/modules/cjs/loader:1207:32)
      at Module._load (node:internal/modules/cjs/loader:1023:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
      'C:\\data\\projects\\DTS-STN\\canadian-dental-care-plan\\frontend\\node_modules\\vite\\node_modules\\rollup\\dist\\native.js'
    ]
  }
}

Node.js v20.10.0

@sebastien-comeau sebastien-comeau enabled auto-merge (squash) January 16, 2024 16:48
Copy link
Contributor

@gregory-j-baker gregory-j-baker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works on my machine!

@sebastien-comeau sebastien-comeau merged commit cbda851 into main Jan 16, 2024
1 check passed
@sebastien-comeau sebastien-comeau deleted the fix-windows-lockfile branch January 16, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants