GreenKct5 / yarukoto-kanri-kun

0 stars 0 forks source link

fix: npm run buildが通らない問題の解決 #28

Closed kototo522 closed 4 months ago

kototo522 commented 4 months ago

Issue 番号

変更内容

変更前 変更後
--- ---

この PR はマージ可能な状態ですか

[x] Yes
[ ] No

参考リンク

参考サイト:
Figma:

その他

-

n00bdy-noname commented 4 months ago

俺の環境でsassインストールしてビルドしてみたけど、通ってそうで通らない、、、

Tomo@Tomos-MacBook-Air yarukoto-kanri-kun % npm run build    

> build
> vite build

/Users/Tomo/Github repositories/yarukoto-kanri-kun/node_modules/rollup/dist/native.js:59
                throw new Error(
                      ^

Error: Cannot find module @rollup/rollup-darwin-arm64. 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 (/Users/Tomo/Github repositories/yarukoto-kanri-kun/node_modules/rollup/dist/native.js:59:9)
    at Object.<anonymous> (/Users/Tomo/Github repositories/yarukoto-kanri-kun/node_modules/rollup/dist/native.js:68:76)
    ... 3 lines matching cause stack trace ...
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at cjsLoader (node:internal/modules/esm/translators:356:17)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:305: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-darwin-arm64'
  Require stack:
  - /Users/Tomo/Github repositories/yarukoto-kanri-kun/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 (/Users/Tomo/Github repositories/yarukoto-kanri-kun/node_modules/rollup/dist/native.js:41:10)
      at Object.<anonymous> (/Users/Tomo/Github repositories/yarukoto-kanri-kun/node_modules/rollup/dist/native.js:68:76)
      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: [
      '/Users/Tomo/Github repositories/yarukoto-kanri-kun/node_modules/rollup/dist/native.js'
    ]
  }
}

Node.js v20.11.1