Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Gentoo install of Publii from Git

  • #4223
    Avatar photo[anonymous]

    Hi to all,

    I have downloaded publii from git on my gentoo hardrive. I cd’ed to the /home/steve/Publii directory and ran “npm install”.

    I had then cd’ed to the app folder and ran “npm install” again. After that, I did “cd ..” to go back to  the root directory, and then ran

    “npm run dev”

    But I get this error when I do:

    steve@mernivia ~/Publii $ npm run dev

    > Publii@0.37.2 dev /home/steve/Publii
    > cross-env NODE_ENV=development webpack –mode=development –progress –colors –watch

    [webpack-cli] Unknown argument: –colors
    ? Which flags do you want to use? …
    ✔ –entry: The entry point(s) of your application e.g. ./src/main.js
    ✔ –config: Provide path to a webpack configuration file e.g. ./webpack.config.js
    ✔ –color: Enable/Disable colors on console
    ✔ –merge: Merge two or more configurations using webpack-merge e.g. -c ./webpack.config.js -c ./webpack.test.config.js –merge
    ✔ –progress: Print compilation progress during build
    ✔ –help: Outputs list of supported flags
    ✔ –output-path: Output location of the file generated by webpack e.g. ./dist/
    ✔ –target: Sets the build target e.g. node
    ✔ –watch: Watch for files changes
    ✔ –hot: Enables Hot Module Replacement
    ✔ –devtool: Determine source maps to use
    ✔ –prefetch: Prefetch this request
    ✔ –json: Prints result as JSON or store it in a file
    ✔ –mode: Defines the mode to pass to webpack
    ✔ –version: Get current version
    ✔ –stats: It instructs webpack on how to treat the stats e.g. verbose
    ✔ –env: Environment passed to the configuration when it is a function
    ✔ –name: Name of the configuration. Used when loading multiple configurations.
    ✔ –config-name: Name of the configuration to use
    ✔ –analyze: It invokes webpack-bundle-analyzer plugin to get bundle information
    ✔ –amd: You can pass `false` to disable AMD support.
    ✔ –bail: Report the first error as a hard error instead of tolerating it.
    ✔ –cache: Enable in memory caching. Disable caching.
    ✔ –cache-type: In memory caching. Filesystem caching.
    ✔ –cache-cache-directory: Base directory for the cache (defaults to node_modules/.cache/webpack).
    ✔ –cache-cache-location: Locations for the cache (defaults to cacheDirectory / name).
    ✔ –cache-hash-algorithm: Algorithm used for generation the hash (see node.js crypto package).
    ✔ –cache-idle-timeout: Time in ms after which idle period the cache storing should happen (only for store: ‘pack’ or ‘idle’).
    ✔ –cache-idle-timeout-for-initial-store: Time in ms after which idle period the initial cache storing should happen (only for store: ‘pack’ or ‘idle’).
    ✔ –cache-immutable-paths: A path to a immutable directory (usually a package manager cache directory).
    ✔ –cache-immutable-paths-reset: Clear all items provided in configuration. List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.
    ✔ –cache-managed-paths: A path to a managed directory (usually a node_modules directory).
    ✔ –cache-managed-paths-reset: Clear all items provided in configuration. List of paths that are managed by a package manager and can be trusted to not be modified otherwise.
    ✔ –cache-name: Name for the cache. Different names will lead to different coexisting caches.
    ✔ –cache-store: When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).
    ✔ –cache-version: Version of the cache data. Different versions won’t allow to reuse the cache and override existing content. Update the version when config changed in a way which doesn’t allow to reuse cache. This will invalidate the cache.
    ✔ –context: The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.
    ✔ –dependencies: References to another configuration to depend on.
    ✔ –dependencies-reset: Clear all items provided in configuration. References to other configurations to depend on.
    ✔ –entry-reset: Clear all items provided in configuration. All modules are loaded upon startup. The last one is exported.
    ✔ –experiments-asset: Allow module type ‘asset’ to generate assets.
    ✔ –experiments-async-web-assembly: Support WebAssembly as asynchronous EcmaScript Module.
    ✔ –experiments-output-module: Allow output javascript files as module source type.
    ✔ –experiments-sync-web-assembly: Support WebAssembly as synchronous EcmaScript Module (outdated).
    ✔ –experiments-top-level-await: Allow using top-level-await in EcmaScript Modules.
    ✔ –externals: Every matched dependency becomes external. An exact matched dependency becomes external. The same string is used as external dependency.
    ✔ –externals-reset: Clear all items provided in configuration. Specify dependencies that shouldn’t be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.
    ✔ –externals-presets-electron: Treat common electron built-in modules in main and preload context like ‘electron’, ‘ipc’ or ‘shell’ as external and load them via require() when used.
    ✔ –externals-presets-electron-main: Treat electron built-in modules in the main context like ‘app’, ‘ipc-main’ or ‘shell’ as external and load them via require() when used.
    ✔ –externals-presets-electron-preload: Treat electron built-in modules in the preload context like ‘web-frame’, ‘ipc-renderer’ or ‘shell’ as external and load them via require() when used.
    ✔ –externals-presets-electron-renderer: Treat electron built-in modules in the renderer context like ‘web-frame’, ‘ipc-renderer’ or ‘shell’ as external and load them via require() when used.
    ✔ –externals-presets-node: Treat node.js built-in modules like fs, path or vm as external and load them via require() when used.
    ✔ –externals-presets-nwjs: Treat NW.js legacy nw.gui module as external and load it via require() when used.
    ✔ –externals-presets-web: Treat references to ‘http(s)://…’ and ‘std:…’ as external and load them via import when used (Note that this changes execution order as externals are executed before any other code in the chunk).
    ✔ –externals-presets-web-async: Treat references to ‘http(s)://…’ and ‘std:…’ as external and load them via async import() when used (Note that this external type is an async module, which has various effects on the execution).
    ✔ –externals-type: Specifies the default type of externals (‘amd*’, ‘umd*’, ‘system’ and ‘jsonp’ depend on output.libraryTarget set to the same value).
    ✔ –ignore-warnings: A RegExp to select the warning message.
    ✔ –ignore-warnings-file: A RegExp to select the origin file for the warning.
    ✔ –ignore-warnings-message: A RegExp to select the warning message.
    ✔ –ignore-warnings-module: A RegExp to select the origin module for the warning.
    ✔ –ignore-warnings-reset: Clear all items provided in configuration. Ignore specific warnings.
    ✔ –infrastructure-logging-debug: Enable/Disable debug logging for all loggers. Enable debug logging for specific loggers.
    ✔ –infrastructure-logging-debug-reset: Clear all items provided in configuration. Enable debug logging for specific loggers.
    ✔ –infrastructure-logging-level: Log level.
    ✔ –module-expr-context-critical: Enable warnings for full dynamic dependencies.
    ✔ –module-expr-context-recursive: Enable recursive directory lookup for full dynamic dependencies.
    ✔ –module-expr-context-reg-exp: Sets the default regular expression for full dynamic dependencies.
    ✔ –module-expr-context-request: Set the default request for full dynamic dependencies.
    ✔ –module-no-parse: A regular expression, when matched the module is not parsed. An absolute path, when the module starts with this path it is not parsed.
    ✔ –module-no-parse-reset: Clear all items provided in configuration. Don’t parse files matching. It’s matched against the full resolved request.
    ✔ –module-rules-compiler: Match the child compiler name.
    ✔ –module-rules-dependency: Match dependency type.
    ✔ –module-rules-enforce: Enforce this rule as pre or post step.
    ✔ –module-rules-exclude: Shortcut for resource.exclude.
    ✔ –module-rules-include: Shortcut for resource.include.
    ✔ –module-rules-issuer: Match the issuer of the module (The module pointing to this module).
    ✔ –module-rules-loader: A loader request.
    ✔ –module-rules-mimetype: Match module mimetype when load from Data URI.
    ✔ –module-rules-real-resource: Match the real resource path of the module.

    Here is the logfile:

    0 info it worked if it ends with ok
    1 verbose cli [ ‘/usr/bin/node’, ‘/usr/bin/npm’, ‘run’, ‘dev’ ]
    2 info using npm@6.14.8
    3 info using node@v14.14.0
    4 verbose run-script [ ‘predev’, ‘dev’, ‘postdev’ ]
    5 info lifecycle Publii@0.37.2~predev: Publii@0.37.2
    6 info lifecycle Publii@0.37.2~dev: Publii@0.37.2
    7 verbose lifecycle Publii@0.37.2~dev: unsafe-perm in lifecycle true
    8 verbose lifecycle Publii@0.37.2~dev: PATH: /usr/lib64/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/steve/Publii/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/11/bin:/usr/lib/llvm/10/bin
    9 verbose lifecycle Publii@0.37.2~dev: CWD: /home/steve/Publii
    10 silly lifecycle Publii@0.37.2~dev: Args: [
    10 silly lifecycle ‘-c’,
    10 silly lifecycle ‘cross-env NODE_ENV=development webpack –mode=development –progress –colors –watch’
    10 silly lifecycle ]
    11 silly lifecycle Publii@0.37.2~dev: Returned: code: 2 signal: null
    12 info lifecycle Publii@0.37.2~dev: Failed to exec dev script
    13 verbose stack Error: Publii@0.37.2 dev: `cross-env NODE_ENV=development webpack –mode=development –progress –colors –watch`
    13 verbose stack Exit status 2
    13 verbose stack at EventEmitter.<anonymous> (/usr/lib64/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
    13 verbose stack at EventEmitter.emit (events.js:315:20)
    13 verbose stack at ChildProcess.<anonymous> (/usr/lib64/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
    13 verbose stack at ChildProcess.emit (events.js:315:20)
    13 verbose stack at maybeClose (internal/child_process.js:1048:16)
    13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
    14 verbose pkgid Publii@0.37.2
    15 verbose cwd /home/steve/Publii
    16 verbose Linux 5.9.0-rc8
    17 verbose argv “/usr/bin/node” “/usr/bin/npm” “run” “dev”
    18 verbose node v14.14.0
    19 verbose npm v6.14.8
    20 error code ELIFECYCLE
    21 error errno 2
    22 error Publii@0.37.2 dev: `cross-env NODE_ENV=development webpack –mode=development –progress –colors –watch`
    22 error Exit status 2
    23 error Failed at the Publii@0.37.2 dev script.
    23 error This is probably not a problem with npm. There is likely additional logging output above.
    24 verbose exit [ 2, true ]

    Any help will be greatly appreciated.

    Regards,

    Steve555

    #4230
    Avatar photo[anonymous]

    Hi,

    If you want to just use Publii, the much easier way will be using AppImage of the app available in the download area 🙂

    If you really need to use the GIT version – please try this https://github.com/GetPublii/Publii/wiki/App-build-process

    #4238
    Avatar photo[anonymous]

    Hi Tomasz,

    Thank you for the swift response to my problem. I did download the Applmage and it did the trick, it works fine under Gentoo, I just hadn’t come across that sort of thing before and it wasn’t that clear to me if I could use it for my system.

    It would’ve been nicer to use the git version, and I did follow the instructions for building Publii under git. Those are the errors I got from the first post building for building Publii.

    Regards,

    Steve55