I’m working on a small project with Laravel and VueJS, but I’m having some trouble with npm, when I want to run „npm run watch“ to test changes on a vue component. I’m running it all on Mac OS 10.14.6.
My node version is v6.11.2 and my npm version is 6.14.4.
This is the error I’m receiving:
/Applications/MAMP/htdocs/novellum/node_modules/chokidar/index.js:151
async remove(item) {
^^^^^^
SyntaxError: Unexpected identifier
at NativeCompileCache._moduleCompile (/Applications/MAMP/htdocs/novellum/node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
at Module._compile (/Applications/MAMP/htdocs/novellum/node_modules/v8-compile-cache/v8-compile-cache.js:186:36)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (/Applications/MAMP/htdocs/novellum/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at Object.<anonymous> (/Applications/MAMP/htdocs/novellum/node_modules/sass/sass.dart.js:98:17)
at Module._compile (/Applications/MAMP/htdocs/novellum/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (/Applications/MAMP/htdocs/novellum/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at implementation (/Applications/MAMP/htdocs/novellum/node_modules/laravel-mix/src/components/Sass.js:55:27)
at implementation (/Applications/MAMP/htdocs/novellum/node_modules/laravel-mix/src/components/Preprocessor.js:130:61)
at global.tap (/Applications/MAMP/htdocs/novellum/node_modules/laravel-mix/src/helpers.js:10:5)
at Sass.loaderOptions (/Applications/MAMP/htdocs/novellum/node_modules/laravel-mix/src/components/Preprocessor.js:128:9)
at extractPlugin (/Applications/MAMP/htdocs/novellum/node_modules/laravel-mix/src/components/Preprocessor.js:87:39)
at global.tap (/Applications/MAMP/htdocs/novellum/node_modules/laravel-mix/src/helpers.js:10:5)
at details.forEach (/Applications/MAMP/htdocs/novellum/node_modules/laravel-mix/src/components/Preprocessor.js:27:13)
at Array.forEach (native)
at Sass.webpackRules (/Applications/MAMP/htdocs/novellum/node_modules/laravel-mix/src/components/Preprocessor.js:22:22)
at ComponentFactory.applyRules (/Applications/MAMP/htdocs/novellum/node_modules/laravel-mix/src/components/ComponentFactory.js:155:23)
at Mix.listen.rules (/Applications/MAMP/htdocs/novellum/node_modules/laravel-mix/src/components/ComponentFactory.js:66:48)
at events.(anonymous function).forEach.handler (/Applications/MAMP/htdocs/novellum/node_modules/laravel-mix/src/Dispatcher.js:34:47)
at Array.forEach (native)
at Dispatcher.fire (/Applications/MAMP/htdocs/novellum/node_modules/laravel-mix/src/Dispatcher.js:34:28)
at Mix.dispatch (/Applications/MAMP/htdocs/novellum/node_modules/laravel-mix/src/Mix.js:118:25)
at WebpackConfig.buildRules (/Applications/MAMP/htdocs/novellum/node_modules/laravel-mix/src/builder/WebpackConfig.js:90:13)
at WebpackConfig.build (/Applications/MAMP/htdocs/novellum/node_modules/laravel-mix/src/builder/WebpackConfig.js:23:14)
at Object.<anonymous> (/Applications/MAMP/htdocs/novellum/node_modules/laravel-mix/setup/webpack.config.js:29:38)
at Module._compile (/Applications/MAMP/htdocs/novellum/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (module.js:579:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch"`
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.
Any suggestions what to do? I already deleted my node_modules folder, my package-lock.json and created it all new, uninstalled npm and reinstalled it via brew.
That's happening because your version of NodeJS don't support async/await calls. You must update your NodeJS to minimum 7.6, but I suggest using v12.x.x.
Check https://nodejs.org/en/ on how to download it and update on your operating system.
Related
Good day everybody,
[Please I am NOT dumping code/error here I am not sure what information may be required by anyone who wants to help, which the reason why I have to provide all information which I believe may be important/neccessary and also I do not know where else I can put the detailed information in]
After installing laravel it was showing the error in the webpage that app.css, app.js were not found
Then I ran the command
npm install && npm run dev
This gave me the result
npm WARN deprecated axios#0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated popper.js#1.16.1: You can find the new Popper v2 at #popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#~2.3.1 (node_modules\watchpack\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN sass-loader#8.0.2 requires a peer of node-sass#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader#8.0.2 requires a peer of fibers#>= 3.1.0 but none is installed. You must install peer dependencies yourself.
added 1094 packages from 506 contributors and audited 1097 packages in 917.337s
found 2 high severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
> # dev C:\laravel_directory
> npm run development
> # development C:\laravel_directory
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
C:\laravel_directory\node_modules\webpack-cli\bin\cli.js:93
throw err;
^
AssertionError [ERR_ASSERTION]: mix.js() is missing required parameter 1: entry
at Function.js (C:\laravel_directory\node_modules\laravel-mix\src\Assert.js:13:9)
at JavaScript.register (C:\laravel_directory\node_modules\laravel-mix\src\components\JavaScript.js:40:16)
at Api.mix.(anonymous function).args [as vue] (C:\laravel_directory\node_modules\laravel-mix\src\components\ComponentFactory.js:98:53)
at Object.<anonymous> (C:\laravel_directory\webpack.mix.js:15:6)
at Module._compile (C:\laravel_directory\node_modules\v8-compile-cache\v8-compile-cache.js:192:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (C:\laravel_directory\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)
at Object.<anonymous> (C:\laravel_directory\node_modules\laravel-mix\setup\webpack.config.js:12:1)
at Module._compile (C:\laravel_directory\node_modules\v8-compile-cache\v8-compile-cache.js:192:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (C:\laravel_directory\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)
at WEBPACK_OPTIONS (C:\laravel_directory\node_modules\webpack-cli\bin\utils\convert-argv.js:114:13)
at requireConfig (C:\laravel_directory\node_modules\webpack-cli\bin\utils\convert-argv.js:116:6)
at C:\laravel_directory\node_modules\webpack-cli\bin\utils\convert-argv.js:123:17
at Array.forEach (<anonymous>)
at module.exports (C:\laravel_directory\node_modules\webpack-cli\bin\utils\convert-argv.js:121:15)
at yargs.parse (C:\laravel_directory\node_modules\webpack-cli\bin\cli.js:71:45)
at Object.parse (C:\laravel_directory\node_modules\webpack-cli\node_modules\yargs\yargs.js:576:18)
at C:\laravel_directory\node_modules\webpack-cli\bin\cli.js:49:8
at Object.<anonymous> (C:\laravel_directory\node_modules\webpack-cli\bin\cli.js:366:3)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\laravel_directory\node_modules\webpack\bin\webpack.js:156:2)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
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! C:\Users\AppData\Roaming\npm-cache\_logs\2021-01-14T03_38_32_222Z-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! C:\Users\AppData\Roaming\npm-cache\_logs\2021-01-14T03_38_32_412Z-debug.log
Please what am I supposed to do to be able to have the installation working as it is supposed to.
I've faced same error on laravel 8 when installing vue on it.
It's actually adding content in webpack.mix.js file like vue().
replace vue() to the following:
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css');
then run npm run watch
Delete your node_module folder and then again run the command.
I am trying to run a laravel-vue application that was developed on mac using valet . When i imported the project on localhost, Npm run dev fails to compile my assets and shows the following error
ERROR Failed to compile with 1 errors 10:08:55 AM
error in ./resources/js/app.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main resolved in C:\xampp\htdocs\tapper\node_modules\#babel\helper-compilation-targets\package.json
at applyExports (internal/modules/cjs/loader.js:491:9)
at resolveExports (internal/modules/cjs/loader.js:507:23)
at Function.Module._findPath (internal/modules/cjs/loader.js:635:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:953:27)
at Function.Module._load (internal/modules/cjs/loader.js:842:27)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (C:\xampp\htdocs\tapper\node_modules\v8-compile-cache\v8-compile-cache.js:161:20)
at Object.<anonymous> (C:\xampp\htdocs\tapper\node_modules\#babel\preset-env\lib\debug.js:8:33)
at Module._compile (C:\xampp\htdocs\tapper\node_modules\v8-compile-cache\v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (C:\xampp\htdocs\tapper\node_modules\v8-compile-cache\v8-compile-cache.js:161:20)
at Object.<anonymous> (C:\xampp\htdocs\tapper\node_modules\#babel\preset-env\lib\index.js:11:14)
at Module._compile (C:\xampp\htdocs\tapper\node_modules\v8-compile-cache\v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (C:\xampp\htdocs\tapper\node_modules\v8-compile-cache\v8-compile-cache.js:161:20)
at requireModule (C:\xampp\htdocs\tapper\node_modules\#babel\core\lib\config\files\plugins.js:165:12)
at loadPreset (C:\xampp\htdocs\tapper\node_modules\#babel\core\lib\config\files\plugins.js:83:17)
at createDescriptor (C:\xampp\htdocs\tapper\node_modules\#babel\core\lib\config\config-descriptors.js:154:9)
at C:\xampp\htdocs\tapper\node_modules\#babel\core\lib\config\config-descriptors.js:109:50
at Array.map (<anonymous>)
at createDescriptors (C:\xampp\htdocs\tapper\node_modules\#babel\core\lib\config\config-descriptors.js:109:29)
at createPresetDescriptors (C:\xampp\htdocs\tapper\node_modules\#babel\core\lib\config\config-descriptors.js:101:10)
at C:\xampp\htdocs\tapper\node_modules\#babel\core\lib\config\config-descriptors.js:58:104
at cachedFunction (C:\xampp\htdocs\tapper\node_modules\#babel\core\lib\config\caching.js:62:27)
at cachedFunction.next (<anonymous>)
at evaluateSync (C:\xampp\htdocs\tapper\node_modules\gensync\index.js:244:28)
at sync (C:\xampp\htdocs\tapper\node_modules\gensync\index.js:84:14)
at presets (C:\xampp\htdocs\tapper\node_modules\#babel\core\lib\config\config-descriptors.js:29:84)
at mergeChainOpts (C:\xampp\htdocs\tapper\node_modules\#babel\core\lib\config\config-chain.js:320:26)
at C:\xampp\htdocs\tapper\node_modules\#babel\core\lib\config\config-chain.js:283:7
# multi ./resources/js/app.js ./resources/sass/app.scss
Asset Size Chunks Chunk Names
/css/app.css 196 KiB /js/app [emitted] /js/app
/js/app.js 7.89 KiB /js/app [emitted] /js/app
ERROR in ./resources/js/app.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main resolved in C:\xampp\htdocs\tapper\node_modules\#babel\helper-compilation-targets\package.json
at applyExports (internal/modules/cjs/loader.js:491:9)
at resolveExports (internal/modules/cjs/loader.js:507:23)
at Function.Module._findPath (internal/modules/cjs/loader.js:635:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:953:27)
at Function.Module._load (internal/modules/cjs/loader.js:842:27)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (C:\xampp\htdocs\tapper\node_modules\v8-compile-cache\v8-compile-cache.js:161:20)
at Object.<anonymous> (C:\xampp\htdocs\tapper\node_modules\#babel\preset-env\lib\debug.js:8:33)
at Module._compile (C:\xampp\htdocs\tapper\node_modules\v8-compile-cache\v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (C:\xampp\htdocs\tapper\node_modules\v8-compile-cache\v8-compile-cache.js:161:20)
at Object.<anonymous> (C:\xampp\htdocs\tapper\node_modules\#babel\preset-env\lib\index.js:11:14)
at Module._compile (C:\xampp\htdocs\tapper\node_modules\v8-compile-cache\v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (C:\xampp\htdocs\tapper\node_modules\v8-compile-cache\v8-compile-cache.js:161:20)
at requireModule (C:\xampp\htdocs\tapper\node_modules\#babel\core\lib\config\files\plugins.js:165:12)
at createDescriptors (C:\xampp\htdocs\tapper\node_modules\#babel\core\lib\config\config-descriptors.js:109:29)
at createPresetDescriptors (C:\xampp\htdocs\tapper\node_modules\#babel\core\lib\config\config-descriptors.js:101:10)
at C:\xampp\htdocs\tapper\node_modules\#babel\core\lib\config\config-descriptors.js:58:104
at cachedFunction (C:\xampp\htdocs\tapper\node_modules\#babel\core\lib\config\caching.js:62:27)
at cachedFunction.next (<anonymous>)
at evaluateSync (C:\xampp\htdocs\tapper\node_modules\gensync\index.js:244:28)
at sync (C:\xampp\htdocs\tapper\node_modules\gensync\index.js:84:14)
at presets (C:\xampp\htdocs\tapper\node_modules\#babel\core\lib\config\config-descriptors.js:29:84)
at mergeChainOpts (C:\xampp\htdocs\tapper\node_modules\#babel\core\lib\config\config-chain.js:320:26)
at C:\xampp\htdocs\tapper\node_modules\#babel\core\lib\config\config-chain.js:283:7
# multi ./resources/js/app.js ./resources/sass/app.scss /js/app[0]
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! # development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 2
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! C:\Users\tunne\AppData\Roaming\npm-cache\_logs\2020-07-13T07_08_55_699Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! # dev: `npm run development`
npm ERR! Exit status 2
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! C:\Users\tunne\AppData\Roaming\npm-cache\_logs\2020-07-13T07_08_55_779Z-debug.log
My question is, since the application was developed on mac and we are trying to run it on windows +xampp on locahost, could the environment configuration be the issue? if so, how do i solve it?
Let me add that the application runs perfectly fine on the staging site (laravel forge) so i donot think there is any error in the code.
Even composer install and composer update fail with "Your requirements could not be resolved to an installable set of packages". Can someone please tell me what the issue is
NPM run dev fails in a new laravel project.
Its says its has problems in my resources\app.js but this file is empty :|
i tryed:
installing older npm version
installing babel version recommended by other questions
updating composer
Empty cach
rm -rf node_modules && npm cache clean --force && npm install
Here is the error in term:
> # dev /Users/sebastiantramper/code/uniekegerechten
> npm run development
> # development /Users/sebastiantramper/code/uniekegerechten
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
98% after emitting SizeLimitsPlugin
ERROR Failed to compile with 1 errors 16:39:49
error in ./resources/js/app.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Package exports for '/Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/helper-compilation-targets' do not define a '.' subpath
at applyExports (internal/modules/cjs/loader.js:485:15)
at resolveExports (internal/modules/cjs/loader.js:508:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:577:20)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:879:27)
at Function.Module._load (internal/modules/cjs/loader.js:785:27)
at Module.require (internal/modules/cjs/loader.js:956:19)
at require (/Users/sebastiantramper/code/uniekegerechten/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at Object.<anonymous> (/Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/preset-env/lib/debug.js:8:33)
at Module._compile (/Users/sebastiantramper/code/uniekegerechten/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1103:10)
at Module.load (internal/modules/cjs/loader.js:914:32)
at Function.Module._load (internal/modules/cjs/loader.js:822:14)
at Module.require (internal/modules/cjs/loader.js:956:19)
at require (/Users/sebastiantramper/code/uniekegerechten/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at Object.<anonymous> (/Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/preset-env/lib/index.js:11:14)
at Module._compile (/Users/sebastiantramper/code/uniekegerechten/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1103:10)
at Module.load (internal/modules/cjs/loader.js:914:32)
at Function.Module._load (internal/modules/cjs/loader.js:822:14)
at Module.require (internal/modules/cjs/loader.js:956:19)
at require (/Users/sebastiantramper/code/uniekegerechten/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at requireModule (/Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/core/lib/config/files/plugins.js:165:12)
at loadPreset (/Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/core/lib/config/files/plugins.js:83:17)
at createDescriptor (/Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/core/lib/config/config-descriptors.js:154:9)
at /Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/core/lib/config/config-descriptors.js:109:50
at Array.map (<anonymous>)
at createDescriptors (/Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/core/lib/config/config-descriptors.js:109:29)
at createPresetDescriptors (/Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/core/lib/config/config-descriptors.js:101:10)
at /Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/core/lib/config/config-descriptors.js:58:104
at cachedFunction (/Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/core/lib/config/caching.js:62:27)
at cachedFunction.next (<anonymous>)
at evaluateSync (/Users/sebastiantramper/code/uniekegerechten/node_modules/gensync/index.js:244:28)
at sync (/Users/sebastiantramper/code/uniekegerechten/node_modules/gensync/index.js:84:14)
at presets (/Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/core/lib/config/config-descriptors.js:29:84)
at mergeChainOpts (/Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/core/lib/config/config-chain.js:320:26)
at /Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/core/lib/config/config-chain.js:283:7
# multi ./resources/js/app.js ./resources/sass/app.scss
Asset Size Chunks Chunk Names
After updating Node js it worked.
cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
/Users/xwu33/src/bioproc/node_modules/webpack-cli/bin/cli.js:93
throw err;
^
TypeError: Cannot read property 'js' of undefined
at Object. (/Users/xwu33/src/bioproc/webpack.mix.js:16:3)
at Module._compile (/Users/xwu33/src/bioproc/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (/Users/xwu33/src/bioproc/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at Object. (/Users/xwu33/src/bioproc/node_modules/laravel-mix/setup/webpack.config.js:12:1)
at Module._compile (/Users/xwu33/src/bioproc/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (/Users/xwu33/src/bioproc/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at WEBPACK_OPTIONS (/Users/xwu33/src/bioproc/node_modules/webpack-cli/bin/utils/convert-argv.js:116:13)
at requireConfig (/Users/xwu33/src/bioproc/node_modules/webpack-cli/bin/utils/convert-argv.js:118:6)
at /Users/xwu33/src/bioproc/node_modules/webpack-cli/bin/utils/convert-argv.js:125:17
at Array.forEach ()
at module.exports (/Users/xwu33/src/bioproc/node_modules/webpack-cli/bin/utils/convert-argv.js:123:15)
at yargs.parse (/Users/xwu33/src/bioproc/node_modules/webpack-cli/bin/cli.js:71:45)
at Object.parse (/Users/xwu33/src/bioproc/node_modules/webpack-cli/node_modules/yargs/yargs.js:567:18)
at /Users/xwu33/src/bioproc/node_modules/webpack-cli/bin/cli.js:49:8
at Object. (/Users/xwu33/src/bioproc/node_modules/webpack-cli/bin/cli.js:390:3)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (/Users/xwu33/src/bioproc/node_modules/webpack/bin/webpack.js:156:2)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # development: cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
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! /Users/xwu33/.npm/_logs/2019-06-21T17_03_18_125Z-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! /Users/xwu33/.npm/_logs/2019-06-21T17_03_18_244Z-debug.log
When I changed webpack.mix.js file like this:
// TypeError: Cannot read property 'js' of undefined
const { mix } = require('laravel-mix');
// work
const mix = require('laravel-mix');
Then it works for me!
Removed node_modules, then npm install --global cross-env, followed by removing cross-env from package.json, then npm run dev worked.
I randomly started getting this error message when I try to run npm run watch. I don't know what I did that would cause it to have an error since I never touched any of the files related to laravel-mix.
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch"
module.js:549
throw err;
^
Error: Cannot find module './Assert'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/node_modules/laravel-mix/src/Api.js:1:76)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch"`
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.
Tried running npm update and npm install to get the latest files but it didn't help.
I even tried manually adding the Assert.js file, but I kept getting new errors with each one that I fixed. There must be a better solution.
I deleted laravel-mix from node_modules and ran npm install again and it changed my error to:
Error: Cannot find module './transform'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/node_modules/ajv-keywords/keywords/index.js:18:14)
Ended up getting npm run watch to work by deleting the node_modules directory and running npm install to get all files fresh. Not sure why I had to delete the node_modules folder to get the fresh files, but at least its working.