gulp-sass isuee while running npm start - javascript

I have all updated version of node,npm,sass but when i add gulp-sass in gulpfile and run npm start its showing following error:
$ npm start
> Dashboard#1.0.0 start D:\Projects\Dashboard
> gulp
module.js:327
throw err;
^
Error: Cannot find module 'ansi-regex'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (D:\Projects\Dashboard\node_modules\gulp-sass\node_modules\gulp-util\node_modules\chalk\node_modules\strip-ansi\index.js:2:17)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)

Related

Error: Cannot find module '../build/Release/wrtc.node'

I`m a student and I facing such bug when I try webtorrent on nodejs on windows10.
Error: Cannot find module '../build/Release/wrtc.node'
Require stack:
- E:\node\hls\node_modules\wrtc\lib\binding.js
- E:\node\hls\node_modules\wrtc\lib\index.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (E:\node\hls\node_modules\wrtc\lib\binding.js:6:20)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'E:\\node\\hls\\node_modules\\wrtc\\lib\\binding.js',
'E:\\node\\hls\\node_modules\\wrtc\\lib\\index.js'
]
}
Same error on both local insatll and global install.
I checked the path, it is ok.
Since the problem is all about wrtc modle, I download the wrtc modle through npm and build it. After I built it successfully I replace the oingianl node_modules by the wrtc`s.

Updating Angular 6 to angular 7 got error

When updating angular 6 to angular 7 I got error. I first used this command npm i -g rxjs-tslint. And then I used this command rxjs-5-to-6-migrate -p src/tsconfig.app.json.I got this error.
module.js:550
throw err;
^
Error: Cannot find module 'typescript'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/lib/node_modules/rxjs-tslint/node_modules/tslint/lib/linter.js:22:10)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
child_process.js:645
throw err;
^
Error: Command failed: "/usr/lib/node_modules/rxjs-tslint/node_modules/.bin/tslint" -c "/usr/lib/node_modules/rxjs-tslint/rxjs-5-to-6-migrate.json" -p "src/tsconfig.app.json" --fix
module.js:550
throw err;
^
Error: Cannot find module 'typescript'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/lib/node_modules/rxjs-tslint/node_modules/tslint/lib/linter.js:22:10)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at checkExecSyncError (child_process.js:602:13)
at Object.execSync (child_process.js:642:13)
at migrate (/usr/lib/node_modules/rxjs-tslint/rxjs-5-to-6-migrate.js:18:34)
at Object.<anonymous> (/usr/lib/node_modules/rxjs-tslint/rxjs-5-to-6-migrate.js:25:14)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
This release needs upgrade: It requires typescript to be installed globally. Also the user must manually add "typescript" as a dev dependency to existing projects. Otherwise, there will be build errors.

Upgraded to Mojave and now Webpack build fails

After upgrading to Mojave, running webpack --mode development on my project now gives me the following error:
ERROR in ./src/templates/contact-list-item.hbs
Module build failed (from ./node_modules/handlebars-loader/index.js):
/Users/username/Desktop/Project/Public/js/node_modules/loader-utils/lib/urlToRequest.js:7
const moduleRequestRegex = /^[^?]*../../;
^
This error is repeated for each of my .hbs files.
I'm uncertain whether this is an npm problem or a webpack problem. I wonder what installing MacOS Mojave might have changed to break this. If anyone has any ideas I would be very grateful! :)
Full stack trace
SyntaxError: Unexpected token .
at new Script (vm.js:74:7)
at NativeCompileCache._moduleCompile (/usr/local/lib/node_modules/webpack-cli/node_modules/v8-compile-cache/v8-compile-cache.js:226:18)
at Module._compile (/usr/local/lib/node_modules/webpack-cli/node_modules/v8-compile-cache/v8-compile-cache.js:172:36)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
at Module.load (internal/modules/cjs/loader.js:589:32)
at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
at Function.Module._load (internal/modules/cjs/loader.js:520:3)
at Module.require (internal/modules/cjs/loader.js:626:17)
at require (/usr/local/lib/node_modules/webpack-cli/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at Object.<anonymous> (/Users/sammettam/Desktop/Vapor3Test/Public/js/node_modules/loader-utils/lib/index.js:8:22)
at Module._compile (/usr/local/lib/node_modules/webpack-cli/node_modules/v8-compile-cache/v8-compile-cache.js:178:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
at Module.load (internal/modules/cjs/loader.js:589:32)
at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
at Function.Module._load (internal/modules/cjs/loader.js:520:3)
at Module.require (internal/modules/cjs/loader.js:626:17)
at require (/usr/local/lib/node_modules/webpack-cli/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at Object.<anonymous> (/Users/sammettam/Desktop/Vapor3Test/Public/js/node_modules/handlebars-loader/index.js:1:81)
at Module._compile (/usr/local/lib/node_modules/webpack-cli/node_modules/v8-compile-cache/v8-compile-cache.js:178:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
at Module.load (internal/modules/cjs/loader.js:589:32)
at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
at Function.Module._load (internal/modules/cjs/loader.js:520:3)
at Module.require (internal/modules/cjs/loader.js:626:17)
at require (/usr/local/lib/node_modules/webpack-cli/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at loadLoader (/usr/local/lib/node_modules/webpack/node_modules/loader-runner/lib/loadLoader.js:13:17)
at iteratePitchingLoaders (/usr/local/lib/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
at runLoaders (/usr/local/lib/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:362:2)
at NormalModule.doBuild (/usr/local/lib/node_modules/webpack/lib/NormalModule.js:265:3)
at NormalModule.build (/usr/local/lib/node_modules/webpack/lib/NormalModule.js:412:15)
# ./src/features/contacts/contact-form.js 7:0-65 62:17-37
# ./src/components/create-menu.js
# ./src/app.js

How can i run node server?

I'm using hapi-ninja, all is ok, and I would just run node server, but if I get these errors, I can not run it going to the route localhost:3000(Custom)
vagrant:/vagrant/hapi-ninja$ node server
module.js:340
throw err;
^
Error: Cannot find module 'boom'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/vagrant/hapi-ninja/node_modules/hapi/lib/index.js:3:12)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
vagrant:/vagrant/hapi-ninja$
The error says it all: you need the module boom.
To install, type in a terminal
npm install boom

Cannot find module 'node-sass-middleware'

When trying to use gulp, I'm having ' Cannot find module 'node-sass-middleware' ' error.
module.js:340
throw err;
^
Error: Cannot find module 'node-sass-middleware'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/wallet/node_modules/gulp-sass/node_modules/node-sass/sass.js:180:22)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
node-sass-middleware is empty for some reason.
I've installed gulp like
sudo npm install -g gulp
node-sass-middleware folder has appeared, but its empty inside but a node_modules folder which is also empty.
/home/wallet/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-sass-middleware/.js
Am I installing gulp wrong?

Categories