Closed rockey5520 closed 3 years ago
you might need to install postcss via e.g. npm install -g postcss
I have installed postcss gloabally and its available in the node_modules folder
Hi, can you provide a working example repo which reproduces this error?
npm list -g --depth=1
npm list --depth=1
If you have tree
installed, try
tree -L 2
server
command in verbose modehugo server -s exampleSite --themesDir=../.. -v
same issue to me.
Hello Dirk Olbrich,
Example repo : https://github.com/rockey5520/blog I am using WSL2 Ubuntu 20.04 as distro Hugo version: v0.75.1/extended linux/amd64 NPM version : 6.14.4
npm list -g --depth=1
rockey@DESKTOP-17V4FVN:/mnt/c/Users/Rockey$ npm list -g --depth=1 /home/rockey/.nvm/versions/node/v12.16.3/lib ├─┬ @angular/cli@10.0.3 │ ├── @angular-devkit/architect@0.1000.3 │ ├── @angular-devkit/core@10.0.3 │ ├── @angular-devkit/schematics@10.0.3 │ ├── @schematics/angular@10.0.3 │ ├── @schematics/update@0.1000.3 │ ├── @yarnpkg/lockfile@1.1.0 │ ├── ansi-colors@4.1.1 │ ├── debug@4.1.1 │ ├── ini@1.3.5 │ ├── inquirer@7.1.0 │ ├── npm-package-arg@8.0.1 │ ├── npm-pick-manifest@6.1.0 │ ├── open@7.0.4 │ ├── pacote@9.5.12 │ ├── read-package-tree@5.3.1 │ ├── rimraf@3.0.2 │ ├── semver@7.3.2 │ ├── symbol-observable@1.2.0 │ ├── universal-analytics@0.4.20 │ └── uuid@8.1.0 ├─┬ autoprefixer@10.0.1 │ ├── browserslist@4.14.5 │ ├── caniuse-lite@1.0.30001143 │ ├── colorette@1.2.1 │ ├── normalize-range@0.1.2 │ ├── num2fraction@1.2.2 │ └── postcss-value-parser@4.1.0 ├─┬ npm@6.14.4 │ ├── abbrev@1.1.1 │ ├── ansicolors@0.3.2 │ ├── ansistyles@0.1.3 │ ├── aproba@2.0.0 │ ├── archy@1.0.0 │ ├── bin-links@1.1.7 │ ├── bluebird@3.5.5 │ ├── byte-size@5.0.1 │ ├── cacache@12.0.3 │ ├── call-limit@1.1.1 │ ├── chownr@1.1.4 │ ├── ci-info@2.0.0 │ ├── cli-columns@3.1.2 │ ├── cli-table3@0.5.1 │ ├── cmd-shim@3.0.3 │ ├── columnify@1.5.4 │ ├── config-chain@1.1.12 │ ├── debuglog@1.0.1 │ ├── detect-indent@5.0.0 │ ├── detect-newline@2.1.0 │ ├── dezalgo@1.0.3 │ ├── editor@1.0.0 │ ├── figgy-pudding@3.5.1 │ ├── find-npm-prefix@1.0.2 │ ├── fs-vacuum@1.2.10 │ ├── fs-write-stream-atomic@1.0.10 │ ├── gentle-fs@2.3.0 │ ├── glob@7.1.6 │ ├── graceful-fs@4.2.3 │ ├── has-unicode@2.0.1 │ ├── hosted-git-info@2.8.8 │ ├── iferr@1.0.2 │ ├── imurmurhash@0.1.4 │ ├── infer-owner@1.0.4 │ ├── inflight@1.0.6 │ ├── inherits@2.0.4 │ ├── ini@1.3.5 │ ├── init-package-json@1.10.3 │ ├── is-cidr@3.0.0 │ ├── json-parse-better-errors@1.0.2 │ ├── JSONStream@1.3.5 │ ├── lazy-property@1.0.0 │ ├── libcipm@4.0.7 │ ├── libnpm@3.0.1 │ ├── libnpmaccess@3.0.2 │ ├── libnpmhook@5.0.3 │ ├── libnpmorg@1.0.1 │ ├── libnpmsearch@2.0.2 │ ├── libnpmteam@1.0.2 │ ├── libnpx@10.2.2 │ ├── lock-verify@2.1.0 │ ├── lockfile@1.0.4 │ ├── lodash._baseindexof@3.1.0 │ ├── lodash._baseuniq@4.6.0 │ ├── lodash._bindcallback@3.0.1 │ ├── lodash._cacheindexof@3.0.2 │ ├── lodash._createcache@3.1.2 │ ├── lodash._getnative@3.9.1 │ ├── lodash.clonedeep@4.5.0 │ ├── lodash.restparam@3.6.1 │ ├── lodash.union@4.6.0 │ ├── lodash.uniq@4.5.0 │ ├── lodash.without@4.4.0 │ ├── lru-cache@5.1.1 │ ├── meant@1.0.1 │ ├── mississippi@3.0.0 │ ├── mkdirp@0.5.4 │ ├── move-concurrently@1.0.1 │ ├── node-gyp@5.1.0 │ ├── nopt@4.0.1 │ ├── normalize-package-data@2.5.0 │ ├── npm-audit-report@1.3.2 │ ├── npm-cache-filename@1.0.2 │ ├── npm-install-checks@3.0.2 │ ├── npm-lifecycle@3.1.4 │ ├── npm-package-arg@6.1.1 │ ├── npm-packlist@1.4.8 │ ├── npm-pick-manifest@3.0.2 │ ├── npm-profile@4.0.4 │ ├── npm-registry-fetch@4.0.3 │ ├── npm-user-validate@1.0.0 │ ├── npmlog@4.1.2 │ ├── once@1.4.0 │ ├── opener@1.5.1 │ ├── osenv@0.1.5 │ ├── pacote@9.5.12 │ ├── path-is-inside@1.0.2 │ ├── promise-inflight@1.0.1 │ ├── qrcode-terminal@0.12.0 │ ├── query-string@6.8.2 │ ├── qw@1.0.1 │ ├── read@1.0.7 │ ├── read-cmd-shim@1.0.5 │ ├── read-installed@4.0.3 │ ├── read-package-json@2.1.1 │ ├── read-package-tree@5.3.1 │ ├── readable-stream@3.6.0 │ ├── readdir-scoped-modules@1.1.0 │ ├── request@2.88.0 │ ├── retry@0.12.0 │ ├── rimraf@2.7.1 │ ├── safe-buffer@5.1.2 │ ├── semver@5.7.1 │ ├── sha@3.0.0 │ ├── slide@1.1.6 │ ├── sorted-object@2.0.1 │ ├── sorted-union-stream@2.1.3 │ ├── ssri@6.0.1 │ ├── stringify-package@1.0.1 │ ├── tar@4.4.13 │ ├── text-table@0.2.0 │ ├── tiny-relative-date@1.3.0 │ ├── uid-number@0.0.6 │ ├── umask@1.1.0 │ ├── unique-filename@1.1.1 │ ├── unpipe@1.0.0 │ ├── update-notifier@2.5.0 │ ├── uuid@3.3.3 │ ├── validate-npm-package-license@3.0.4 │ ├── validate-npm-package-name@3.0.0 │ ├── which@1.3.1 │ ├── worker-farm@1.7.0 │ └── write-file-atomic@2.4.3 ├── UNMET PEER DEPENDENCY postcss@^8.1.0 └─┬ postcss-cli@8.0.0 ├── chalk@4.1.0 ├── chokidar@3.4.2 ├── dependency-graph@0.9.0 ├── fs-extra@9.0.1 ├── get-stdin@8.0.0 ├── globby@11.0.1 ├── UNMET PEER DEPENDENCY postcss@^8.1.0 ├── postcss-load-config@2.1.2 ├── postcss-reporter@7.0.1 ├── pretty-hrtime@1.0.3 ├── read-cache@1.0.0 └── yargs@16.0.3
npm ERR! peer dep missing: postcss@^8.1.0, required by autoprefixer@10.0.1 npm ERR! peer dep missing: postcss@^8.0.0, required by postcss-cli@8.0.0 npm ERR! peer dep missing: postcss@^8.1.0, required by postcss-reporter@7.0.1
npm list --depth=1
rockey@DESKTOP-17V4FVN:/mnt/c/Users/Rockey$ npm list --depth=1 /mnt/c/Users/Rockey └── (empty)
tree -L 2
rockey@DESKTOP-17V4FVN:~/projects/blog$ tree -L 2 . ├── archetypes │ └── default.md ├── config.toml ├── content ├── data ├── layouts ├── static └── themes └── blogtheme
7 directories, 2 files
hugo server -s themes/blogtheme/exampleSite --themesDir=../.. -v
rockey@DESKTOP-17V4FVN:~/projects/blog$ hugo server -s themes/blogtheme/exampleSite --themesDir=../.. -v INFO 2020/10/06 15:32:30 No translation bundle found for default language "en" INFO 2020/10/06 15:32:30 Translation func for language en not found, use default. INFO 2020/10/06 15:32:30 i18n not initialized; if you need string translations, check that you have a bundle in /i18n that matches the site language or the default language. INFO 2020/10/06 15:32:30 Using config file: Start building sites … INFO 2020/10/06 15:32:30 syncing static files to / INFO 2020/10/06 15:32:30 postcss: use config file /home/rockey/projects/blog/themes/blogtheme/assets/css/postcss.config.js INFO 2020/10/06 15:32:30 postcss: internal/modules/cjs/loader.js:960 throw err; ^
Error: Cannot find module 'postcss' Require stack:
Error: Cannot find module 'postcss' Require stack:
I have answered all question you mentioned in the previous post. please let me know if you need any further information
same issue here on windows without wsl
Sorry, no help from my side as this seems to be a NPM setup issue.
same issue on mac too
Hi dirkolbrich,
Hope you are having a good day
I noticed when using the theme you developed works well in windows env but when I tried this with WSL it fails with below error, would you be able to assist? Error is the same on my project and also the same when I build a new project using your latest repo contents.