我刚刚迁移到ubuntu作为我的web开发的主要操作系统。我安装了VScode并复制了我的项目。当我运行tailwindcss的npm run build或watch命令时,我得到了以下错误:
> ecommerce-product-page-main@1.0.0 build
> tailwindcss -i ./src/input.css -o ./css/main.css
/home/dev-aldo/Documents/Dev Folder/All Works/ecommerce-product-page-main/node_modules/yaml/dist/compose/composer.js:33
if (prelude[i + 1]?.[0] !== '#')
^
SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/dev-aldo/Documents/Dev Folder/All Works/ecommerce-product-page-main/node_modules/yaml/dist/index.js:3:16)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
我已经安装了重建的npm,但仍然得到错误。我是非常新的ubuntu,所以请记住这一点。
1条答案
按热度按时间lhcgjxsq1#
我通过重新安装tailwind修复了此问题: