Errors on npm compile, following the user guide of the OneUI template install

Hello,

I’ve just purchased the OneUI theme and i’m currently learning Laravel (i’ve only developed pure PHP so far). And i’m stuck in the install of the OneUI theme.
After having installed Laravel, with composer :

composer create-project laravel/laravel myapp
cd myapp
php artisan serve

I then followed the Laravel Starter Kit method in the documentation on OneUI.
It tells me to do an npm install, and then npm run dev.

This is where my problem starts.
I get errors, that I unfortunately don’t understand.
I seems like it’s missing a bin called “mix”.
Could it be due to a PATH issue ? Why as i’m just following the install guide after a fresh install.

@ dev /volume1/web/dev/myapp
npm run development
@ development /volume1/web/dev/myapp
mix
sh: mix: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! @ development: mix
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /var/services/homes/jerome/.npm/_logs/2021-01-26T22_49_40_616Z-debu g.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: npm run development
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /var/services/homes/jerome/.npm/_logs/2021-01-26T22_49_40_839Z-debu g.log

Thanks for your help.

There are a few reasons this could happen. It’s hard to say for sure without having the npm install logs and the package.json file.

I would try installing the laravel-mix package globally to see if that fixes it. If you get other “command not found” errors after doing so, I would guess that the npm install failed, so check that output for errors.

sudo npm install -g laravel-mix

Thank you very much, there’s some improvements.
I’ve also had to install in global : npx and cross-env

But it still doesn’t complete the compilation.
During the npm run development, it told me that webpack must be installed.
And asked me if I want to install webpack-cli. I answered yes. the install of webpack went OK.

Here’s the feedback of my npm run development command line in the console :

@ dev /volume1/web/dev/gg4
npm run development

@ development /volume1/web/dev/myproject
mix

npx: installed 79 in 11.2s
CLI for webpack must be installed.
webpack-cli (GitHub - webpack/webpack-cli: Webpack's Command Line Interface)

We will use “npm” to install the CLI via “npm install -D webpack-cli”.
Do you want to install ‘webpack-cli’ (yes/no): yes
Installing ‘webpack-cli’ (running ‘npm install -D webpack-cli’)…
npm WARN browser-sync-webpack-plugin@2.3.0 requires a peer of webpack@^1 || ^2 || ^3 || ^4 || ^5 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader@10.1.1 requires a peer of webpack@^4.36.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-cli@4.4.0 requires a peer of webpack@4.x.x || 5.x.x but none is installed. You must install peer dependencies yourself.
npm WARN @webpack-cli/configtest@1.0.0 requires a peer of webpack@4.x.x || 5.x.x but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.1 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.1: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})

  • webpack-cli@4.4.0
    updated 1 package and audited 273 packages in 5.962s

11 packages are looking for funding
run npm fund for details

found 0 vulnerabilities

Error: Cannot find module ‘webpack-cli/package.json’
Require stack:

  • /volume1/homes/admin/.npm/_npx/4741/lib/node_modules/webpack/bin/webpack.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
    at Function.resolve (internal/modules/cjs/helpers.js:83:19)
    at runCli (/volume1/homes/admin/.npm/_npx/4741/lib/node_modules/webpack/bin/webpack.js:50:26)
    at /volume1/homes/admin/.npm/_npx/4741/lib/node_modules/webpack/bin/webpack.js:139:5
    at processTicksAndRejections (internal/process/task_queues.js:97:5) {
    code: ‘MODULE_NOT_FOUND’,
    requireStack: [
    ‘/volume1/homes/admin/.npm/_npx/4741/lib/node_modules/webpack/bin/webpack.js’
    ]
    }
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! @ development: mix
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the @ development script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /var/services/homes/admin/.npm/_logs/2021-01-27T08_20_48_963Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: npm run development
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /var/services/homes/admin/.npm/_logs/2021-01-27T08_20_49_232Z-debug.log

And below, the content of the log file

0 Info it worked if it ends with ok
1 verbose cli [
1 verbose cli ‘/volume1/@appstore/Node.js_v12/usr/local/bin/node’,
1 verbose cli ‘/usr/local/bin/npm’,
1 verbose cli ‘run’,
1 verbose cli ‘development’
1 verbose cli ]
2 info using npm@6.14.4
3 info using node@v12.16.3
4 verbose run-script [ ‘predevelopment’, ‘development’, ‘postdevelopment’ ]
5 info lifecycle @~predevelopment: @
6 info lifecycle @~development: @
7 verbose lifecycle @~development: unsafe-perm in lifecycle true
8 verbose lifecycle @~development: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/volume1/web/dev/myproject/node_modules/.bin:/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/volume1/web/dev/myproject/node_modules/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
9 verbose lifecycle @~development: CWD: /volume1/web/dev/myproject
10 silly lifecycle @~development: Args: [ ‘-c’, ‘mix’ ]
11 silly lifecycle @~development: Returned: code: 1 signal: null
12 info lifecycle @~development: Failed to exec development script
13 verbose stack Error: @ development: mix
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:310:20)
13 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:310:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid @
15 verbose cwd /volume1/web/dev/myproject
16 verbose Linux 4.4.59+
17 verbose argv “/volume1/@appstore/Node.js_v12/usr/local/bin/node” “/usr/local/bin/npm” “run” “development”
18 verbose node v12.16.3
19 verbose npm v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error @ development: mix
22 error Exit status 1
23 error Failed at the @ development script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Thank you again for your precious help. I hope I can start to work on my project soon :slight_smile:

Thanks for the verbose logs!

The npm run command automatically adds the node_modules/.bin directory to the PATH of any child processes. I can see this is being done correctly in your logs, so that’s probably not the issue. When a locally-installed package exposes some executable, npm should create a symlink in that directory with the command name, like mix or webpack.

Can you run this command in your project’s root directory and paste the output here? I’m curious if things are being installed correctly.

ls -l node_modules/.bin

It seems like the symlinks aren’t created :expressionless:

lrwxrwxrwx 1 jerome users 27 Jan 26 23:49 browser-sync -> …/browser-sync/dist/bin.js

lrwxrwxrwx 1 jerome users 23 Jan 26 23:49 dev-ip -> …/dev-ip/lib/dev-ip.js

lrwxrwxrwx 1 admin users 22 Jan 27 09:18 envinfo -> …/envinfo/dist/cli.js

lrwxrwxrwx 1 admin users 31 Jan 27 09:18 import-local-fixture -> …/import-local/fixtures/cli.js

lrwxrwxrwx 1 jerome users 19 Jan 26 23:49 json5 -> …/json5/lib/cli.js

lrwxrwxrwx 1 jerome users 24 Jan 26 23:49 lt -> …/localtunnel/bin/lt.js

lrwxrwxrwx 1 jerome users 14 Jan 26 23:49 mime -> …/mime/cli.js

lrwxrwxrwx 1 admin users 23 Jan 27 09:18 node-which -> …/which/bin/node-which

lrwxrwxrwx 1 jerome users 15 Jan 26 23:49 sass -> …/sass/sass.js

lrwxrwxrwx 1 jerome users 23 Jan 26 23:49 semver -> …/semver/bin/semver.js

lrwxrwxrwx 1 jerome users 39 Jan 26 23:49 throttleproxy -> …/stream-throttle/bin/throttleproxy.js

lrwxrwxrwx 1 admin users 25 Jan 27 09:20 webpack-cli -> …/webpack-cli/bin/cli.js

Hi @baileyherbert , i’m new at codecanyon i want to sell a python.exe and i want to integrate a verify code purchase to my app code source and a license key so that the buyer will run the .exe in one computer i had reading some stuff about envato api and really i didnt get it that much, any way that could i make this i’m really confused i need your help thank you !