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

npm run watch wont work #4

Closed
chrisvidal opened this issue Dec 18, 2020 · 9 comments
Closed

npm run watch wont work #4

chrisvidal opened this issue Dec 18, 2020 · 9 comments

Comments

@chrisvidal
Copy link

chrisvidal commented Dec 18, 2020

 ERROR  Failed to compile with 2 errors                                                                                                       4:18:29 PM

 error  in ./assets/src/css/app.css

Module build failed (from ./node_modules/css-loader/index.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/src/index.js):
TypeError: getProcessedPlugins is not a function

...

 error  in ./assets/src/css/app.css

Module build failed (from ./node_modules/postcss-loader/src/index.js):
TypeError: Object.entries(...).flatMap is not a function
@cjkpl
Copy link
Owner

cjkpl commented Dec 18, 2020

Hi Chris,

I just tested it on a fresh PC, no issues. Will test later on Linux.

Anyway, this does not seem to be related with the theme config, but instead it with Tailwind 2.0 + PostCSS 7.0 - please see whether this thread helps.

You can also try removing the "typography" plugin from config, if you do not use it - I recall someone mentioned that the npm install failed with typography, they had to install without, and add typography later.

@chrisvidal
Copy link
Author

Hi @cjkpl

I am on macos. I am currenlty updating all my cli tools, npm, nodejs, and more. I will try again with your reco after.
thanks

@chrisvidal
Copy link
Author

ok, now it is even worse after upgrading everything, npm install does not even start anymore, damn

internal/modules/cjs/loader.js:583
    throw err;
    ^

Error: Cannot find module '../lib/cli.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:2:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)

@chrisvidal
Copy link
Author

I had to uninstall node and reinstall it, weird

@chrisvidal
Copy link
Author

after remove the typo plugin and running npm run watch, I still have the same 2 errors so far

@cjkpl
Copy link
Owner

cjkpl commented Dec 18, 2020

I'll ask my colleague to test it on a mac.

Meanwhile, if you don't mind using the older TailwindCSS 1.9.x, you could try with the pre-2.x version of the theme here.

@chrisvidal
Copy link
Author

ok, I had to update to node 14.x and now it is running. here is my modified package.json

{
  "name": "tabularasa",
  "version": "2.0.0",
  "description": "A simplest TailwindCss boilerplate theme - see git+https://github.com/cjkpl/oc-tabularas-theme",
  "main": "app.js",
  "scripts": {
    "dev": "npm run development",
    "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch": "npm run development -- --watch",
    "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
    "prod": "npm run production",
    "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
  },
  "author": "'CJK.PL'",
  "license": "MIT",
  "devDependencies": {
    "@babel/core": "^7.12.3",
    "autoprefixer": "^9.8.6",
    "browser-sync": "^2.26.13",
    "browser-sync-webpack-plugin": "^2.2.2",
    "laravel-mix": "^5.0.9",
    "laravel-mix-purgecss": "^5.0.0",
    "postcss": "^7.0.35",
    "postcss-import": "^12.0.1",
    "postcss-nested": "^4.2.1",
    "resolve-url-loader": "^3.1.2",
    "vue-template-compiler": "^2.6.12"
  },
  "dependencies": {
    "@tailwindcss/typography": "^0.3.1",
    "cross-env": "^7.0.2",
    "fontsource-poppins": "^3.0.10",
    "tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.0.1",
    "vue": "^2.6.12"
  }
}

@chrisvidal
Copy link
Author

thanks for your support 👍

@cjkpl
Copy link
Owner

cjkpl commented Dec 18, 2020

I'm glad it worked for you :-)

@cjkpl cjkpl closed this as completed Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants