0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

npm run buildできなくなった話

0
Posted at

忘れないように書いておきます:tea:

きっかけ

Catalinaで動かしていたWailsのプロジェクトをBigSurの環境にクローンした。
あれ、ビルド出来ないじゃないですか...

 WAIT  Compiling...                                                                                   2:33:34

98% after emitting

 ERROR  Failed to compile with 1 error                                                                2:33:35

 error  in ./src/components/AWS.vue?vue&type=style&index=0&id=b9fe5306&scoped=true&lang=css&

Syntax Error: Error: Loading PostCSS Plugin failed: No valid exports main found for '/path/to/wailsapp/frontend/node_modules/colorette'

(@/path/to/wailsapp/frontend/package.json)
    at Array.map (<anonymous>)

原因

nodeのバージョン古かった

% node -v
v13.5.0

解決方法

% nodebrew install stable
Fetching: https://nodejs.org/dist/v16.0.0/node-v16.0.0-darwin-x64.tar.gz
###################################################################################################### 100.0%
Installed successfully
% nodebrew list
v13.5.0
v16.0.0

current: v13.5.0
% node use v16.0.0
use v16.0.0
% node -v
v16.0.0
% npm run build
#### 省略 ####
  File            Size                                        Gzipped

  dist/app.js     199.81 KiB                                  69.14 KiB
  dist/app.css    138.32 KiB                                  76.13 KiB

  Images and other types of assets omitted.

 DONE  Build complete. The dist directory is ready to be deployed.
 INFO  Check out deployment instructions at https://cli.vuejs.org/guide/deployment.html
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?