Open crameep opened 8 years ago
Same happend to me.
what version of node do u have installed? i updated to latest stable (v6.6.0) and it seem to help
I have the exact same issue, it's not possible for me to run Spark anymore. I tried so many things, but I keep coming to this error.
+1
Running into same error on Vagrant running node 7 npm 2.14 laravel 5.3
Same Issue :( Node v7
I had the same problem, just update node to the last version.
sudo npm install -g n
then delete the folder "node_modules" and do again:
npm install
this issue also seems to be inherent to yarn v 1.1.0
as well, and only removing node_modules
and doing a fresh sudo npm i -g && npm i
works
After trying everything, nothing worked until I removed the package-lock.json and node_modules folder
I discovered that it works with yarn 0.27.5, but after upgrading to yarn 1.2.x, it stopped working. After doing a diff on the node_modules folders both installed, I saw that the newer yarn did not install buble anymore. Probably there was a change in dependency management causing this. There was a library that needed buble though. But it just was not there and the resulting error message is not clear about this.
So the solution that worked for me was adding buble as a direct dependency. (i.e via yarn add buble)
TL;DR
$ npm install buble-loader --save-dev
This issue happened to me too. It appears to have something to do with webpack changing its configuration schema from an approach where the -loader
part of for example "buble-loader"
could be omitted to the new approach for newer webpack versions where it must be included in the config.
This package uses the old approach so when for some reason a newer webpack distribution is installed, webpack initially looks for the package "buble"
, instead of "buble-loader"
. Hence the error that says that _'nodemodules/buble/dist/buble.umd.js' is not a loader. This is correct, because it obviously isn't one. The other way around, older webpack versions might first be looking for "buble" + "-loader"
, and when not found, try to resolve "buble"
instead.
I also noticed that in my case buble-loader was not installed at all, despite the fact that it is listed in this package's dependencies list. Maybe webpack defaults to "buble"
in this case. I used yarn v1.9.4
to install my dependencies. (the buble package is installed however).
This might be the reason the build process exits with aforementioned error, because (the older versions of) webpack can not find "buble" + "-loader"
.
Bottom line: I worked around this error by explicitly installing "buble-loader"
into my project.
My installed webpack version is 3.8.1
.
I apologize if this is in the wrong place but, its as far as I got with it. I get this with default install of laravel 5.3 after I run npm install and then try to run gulp I get this error. This doesn't seem to happen on my Macbook only my Cloud9 Instance.
`/home/ubuntu/workspace/node_modules/laravel-elixir-webpack-official/node_modules/webpack/node_modules/loader-runner/lib/loadLoader.js:35 throw new Error("Module '" + loader.path + "' is not a loader (must have normal or pitch function)"); ^
Error: Module '/home/ubuntu/workspace/node_modules/buble/dist/buble.umd.js' is not a loader (must have normal or pitch function) at loadLoader (/home/ubuntu/workspace/node_modules/laravel-elixir-webpack-official/node_modules/webpack/node_modules/loader-runner/lib/loadLoader.js:35:10) at iteratePitchingLoaders (/home/ubuntu/workspace/node_modules/laravel-elixir-webpack-official/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:140:2) at runLoaders (/home/ubuntu/workspace/node_modules/laravel-elixir-webpack-official/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:326:2) at NormalModule.doBuild (/home/ubuntu/workspace/node_modules/laravel-elixir-webpack-official/node_modules/webpack/lib/NormalModule.js:125:2) at NormalModule.build (/home/ubuntu/workspace/node_modules/laravel-elixir-webpack-official/node_modules/webpack/lib/NormalModule.js:173:15) at Compilation.buildModule (/home/ubuntu/workspace/node_modules/laravel-elixir-webpack-official/node_modules/webpack/lib/Compilation.js:127:9) at Compilation. (/home/ubuntu/workspace/node_modules/laravel-elixir-webpack-official/node_modules/webpack/lib/Compilation.js:401:8)
at /home/ubuntu/workspace/node_modules/laravel-elixir-webpack-official/node_modules/webpack/lib/NormalModuleFactory.js:63:13
at NormalModuleFactory.applyPluginsAsyncWaterfall (/home/ubuntu/workspace/node_modules/laravel-elixir-webpack-official/node_modules/webpack/node_modules/tapable/lib/Tapable.js:123:70)
at onDoneResolving (/home/ubuntu/workspace/node_modules/laravel-elixir-webpack-official/node_modules/webpack/lib/NormalModuleFactory.js:38:11)`