requarks / wiki

Wiki.js | A modern and powerful wiki app built on Node.js
https://js.wiki
GNU Affero General Public License v3.0
24.4k stars 2.7k forks source link

Issue building on Mac OS #838

Closed curieos closed 5 years ago

curieos commented 5 years ago

Actual behavior

I get these errors when building. I have tried to rebuild, reclone and rebuild, and I tried looking up this issue, none of the solutions I found were relevant/worked.

warning Resolution field "core-js@3.0.0-beta.11" is incompatible with requested version "core-js@3.0.0-beta.13
warning Resolution field "core-js@3.0.0-beta.11" is incompatible with requested version "core-js@3.0.0-beta.13"
warning mathjax-node > jsdom > left-pad@1.3.0: use String.prototype.padStart()
warning passport-cas > node-uuid@1.4.1: Use uuid module instead
warning core-js@2.6.3: core-js@<2.6.5 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
warning graphql-voyager > @material-ui/core > recompose > fbjs > core-js@1.2.7: core-js@<2.6.5 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
warning postcss-cssnext@3.1.0: 'postcss-cssnext' has been deprecated in favor of 'postcss-preset-env'. Read more at https://moox.io/blog/deprecating-cssnext/
warning postcss-cssnext > autoprefixer > browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning postcss-cssnext > caniuse-api > browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning postcss-cssnext > pixrem > browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning postcss-cssnext > postcss-calc > postcss-selector-parser > flatten@1.0.2: I wrote this module a very long time ago; you should use something else.
warning postcss-cssnext > postcss-color-rebeccapurple > postcss-values-parser > flatten@1.0.2: I wrote this module a very long time ago; you should use something else.
warning postcss-preset-env > postcss-color-gray > postcss-values-parser > flatten@1.0.2: I wrote this module a very long time ago; you should use something else.
warning Resolution field "terser@3.14.1" is incompatible with requested version "terser@^3.16.1"
warning "apollo-server > apollo-server-core > apollo-tracing@0.5.2" has incorrect peer dependency "graphql@0.10.x - 14.1.x".
warning " > graphiql@0.13.0" has unmet peer dependency "prop-types@>=15.5.0".
warning "graphiql > codemirror-graphql@0.7.1" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0".
warning "graphiql > codemirror-graphql > graphql-language-service-parser@1.2.2" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0".
warning "graphiql > codemirror-graphql > graphql-language-service-interface@1.3.2" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0".
warning "graphiql > codemirror-graphql > graphql-language-service-parser > graphql-language-service-types@1.2.2" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0".
warning "graphiql > codemirror-graphql > graphql-language-service-parser > graphql-config@2.0.1" has incorrect peer dependency "graphql@^0.11.0 || ^0.12.0 || ^0.13.0".
warning "graphiql > codemirror-graphql > graphql-language-service-parser > graphql-config > graphql-import@0.4.5" has incorrect peer dependency "graphql@^0.11.0 || ^0.12.0 || ^0.13.0".
warning "graphiql > codemirror-graphql > graphql-language-service-interface > graphql-language-service-utils@1.2.2" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0".
warning " > postcss-cssnext@3.1.0" has unmet peer dependency "caniuse-lite@^1.0.30000697".

When running docker-dev-up I get this error:

     ❯ Build modules (1%)
    → 6 of 8 modules :: client/index-setup.js

WARNING: We noticed you're using the `useBuiltIns` option without declaring a core-js version. Currently, we assume version 2.x when no version is passed. Since this default version will likely change in future versions of Babel, we recommend explicitly setting the core-js version you are using via the `corejs` option.

Followed by this

webpack built a2d08084760efe21825d in 2513ms
internal/modules/cjs/loader.js:584
    throw err;
    ^

Error: Cannot find module './DirectoryWatcher'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at WatcherManager.getDirectoryWatcher (/wiki/node_modules/watchpack/lib/watcherManager.js:14:25)
    at WatcherManager.watchFile (/wiki/node_modules/watchpack/lib/watcherManager.js:28:14)
    at Watchpack.<anonymous> (/wiki/node_modules/watchpack/lib/watchpack.js:38:49)
    at Array.map (<anonymous>)
    at Watchpack.watch (/wiki/node_modules/watchpack/lib/watchpack.js:37:28)
    at NodeWatchFileSystem.watch (/wiki/node_modules/webpack/lib/node/NodeWatchFileSystem.js:70:16)
    at IgnoringWatchFileSystem.watch (/wiki/node_modules/webpack/lib/WatchIgnorePlugin.js:29:28)
    at Watching.watch (/wiki/node_modules/webpack/lib/Watching.js:113:48)
    at compiler.hooks.done.callAsync (/wiki/node_modules/webpack/lib/Watching.js:100:10)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/wiki/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:33:1)
    at AsyncSeriesHook.lazyCompileHook (/wiki/node_modules/tapable/lib/Hook.js:154:20)
    at Watching._done (/wiki/node_modules/webpack/lib/Watching.js:97:28)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
make: *** [docker-dev-up] Error 1

Expected behavior

A successful build with wiki.js running on localhost

Steps to reproduce the behavior

Build on Mac OS. Additional commands I ran after cloning and opening VSCode, before building:

npm i pug-lint
npm i eslint
npm i acorn
npm i -g yarn
curieos commented 5 years ago

I shut down all docker containers, restarted docker, and recloned and it built this time. Still not sure what was causing this though.

curieos commented 5 years ago

I think the issue I was having was related to iCloud, I have it set to sync my documents folder. I renamed the wiki.js folder to wiki.nosync and I have had better luck. I think iCloud was touching things before they were ready to be touched, maybe reverting changes that were happening in the process.