Grace Uwimana
Grace Uwimana

Reputation: 89

npm run dev 98% after emitting SizeLimitsPlugin>This dependency was not found

I want to integrate google map in my laravel project and I got the below error when running npm run dev:

98% after emitting SizeLimitsPlugin

ERROR Failed to compile with 1 errors 10:52:34 PM This dependency was not found:

To install it, you can run: npm install --save /var/www/project_name/resources/sass/app.scss Asset Size Chunks Chunk Names /js/app.js 7.23 KiB /js/app [emitted] /js/app

ERROR in ./resources/js/app.js Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find module '@babel/preset-react' from '/var/www/project_name' at Function.resolveSync [as sync] (/var/www/project_name/node_modules/resolve/lib/sync.js:90:15) at resolveStandardizedName (/var/www/project_name/node_modules/@babel/core/lib/config/files/plugins.js:101:31) at resolvePreset (/var/www/project_name/node_modules/@babel/core/lib/config/files/plugins.js:58:10) at loadPreset (/var/www/project_name/node_modules/@babel/core/lib/config/files/plugins.js:77:20) at createDescriptor (/var/www/project_name/node_modules/@babel/core/lib/config/config-descriptors.js:154:9) at /var/www/project_name/node_modules/@babel/core/lib/config/config-descriptors.js:109:50 at Array.map () at createDescriptors (/var/www/project_name/node_modules/@babel/core/lib/config/config-descriptors.js:109:29) at createPresetDescriptors (/var/www/project_name/node_modules/@babel/core/lib/config/config-descriptors.js:101:10) at presets (/var/www/project_name/node_modules/@babel/core/lib/config/config-descriptors.js:47:19) at mergeChainOpts (/var/www/project_name/node_modules/@babel/core/lib/config/config-chain.js:416:26) at /var/www/project_name/node_modules/@babel/core/lib/config/config-chain.js:374:7 at Generator.next () at loadFileChain (/var/www/project_name/node_modules/@babel/core/lib/config/config-chain.js:228:24) at loadFileChain.next () at buildRootChain (/var/www/project_name/node_modules/@babel/core/lib/config/config-chain.js:135:29) at buildRootChain.next () at loadPrivatePartialConfig (/var/www/project_name/node_modules/@babel/core/lib/config/partial.js:101:62) at loadPrivatePartialConfig.next () at /var/www/project_name/node_modules/@babel/core/lib/config/partial.js:140:25 at Generator.next () at step (/var/www/project_name/node_modules/gensync/index.js:261:32) at /var/www/project_name/node_modules/gensync/index.js:273:13 at async.call.result.err.err (/var/www/project_name/node_modules/gensync/index.js:223:11) at /var/www/project_name/node_modules/gensync/index.js:189:28 at /var/www/project_name/node_modules/@babel/core/lib/gensync-utils/async.js:72:7 at /var/www/project_name/node_modules/gensync/index.js:113:33 at step (/var/www/project_name/node_modules/gensync/index.js:287:14) at /var/www/project_name/node_modules/gensync/index.js:273:13 at async.call.result.err.err (/var/www/project_name/node_modules/gensync/index.js:223:11) at /var/www/project_name/node_modules/gensync/index.js:189:28 at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3) @ multi ./resources/js/app.js ./resources/sass/app.scss /js/app[0]

ERROR in multi ./resources/js/app.js ./resources/sass/app.scss Module not found: Error: Can't resolve 'css-loader' in '/var/www/project_name' @ multi ./resources/js/app.js ./resources/sass/app.scss /js/app[1] npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! project_name@ 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 project_name@ 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! /root/.npm/_logs/2020-12-11T22_52_34_252Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! project_name@ dev: npm run development npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the project_name@ 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! /root/.npm/_logs/2020-12-11T22_52_34_309Z-debug.log

I tried different things and none worked: npm update npm uninstall --save-dev sass-loader npm install --save-dev [email protected] npm install --save npm install

but the error persist when I run npm run dev.

Upvotes: 9

Views: 2205

Answers (1)

Ľuboš Csonka
Ľuboš Csonka

Reputation: 57

I experienced the same issue when I tried to use

import {someFunction} from '';

, i.e. I forgot to specify the package to import from.

When I fixed the import I compiled with no issue.

Upvotes: 0

Related Questions