Can you try running npm rebuild and then try again?
Sep 30, 2021
14
Level 2
Laravel mix npm run dev on linux produce SyntaxError: missing ) after argument list
I can't use npm run dev|prod|watch on my staging linux server. It produces this :
npm run production
glob error [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] {
errno: -13,
code: 'EACCES',
syscall: 'scandir',
path: '/root/.npm/_logs'
}
> production
> mix --production
/var/www/html/preprodCerf2021/node_modules/laravel-mix/bin/cli.js:2
basedir=$(dirname "$(echo "LARACASTS_SNIPPET_PLACEHOLDER" | sed -e 's,\,/,g')")
^^^^^^^
SyntaxError: missing ) after argument list
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1031:15)
at Module._compile (node:internal/modules/cjs/loader:1065:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
at node:internal/main/run_main_module:17:47
nodeJs is up to date v 16.8.0 and npm v 7.21.0 my the compilation works perfectly on my windows dev machine.
Please or to participate in this conversation.