I want to use the following framework:
https://github.com/FlorientR/laravel-gentelella
But when I follow the installation guide I need to run the following commands:
php artisan key:generate
npm install --global bower gulp
npm install
bower install
gulp
The first command works fine, but: npm install --global bower gulp fails. It gives the following error:
> C:\Program Files\nodejs\node_modules\npm\node_modules\request\node_modules\har-valid
ator\src\index.js:1
(function (exports, require, module, __filename, __dirname) { ����������������
^
SyntaxError: Unexpected token ILLEGAL
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\req
uest\lib\har.js:5:16)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\no
de_modules\\npm\\bin\\npm-cli.js" "install" "--global" "bower" "gulp"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
> npm ERR! C:\Program Files\nodejs\node_modules\npm\node_modules\request\node_modules\
har-validator\src\index.js:1
npm ERR! (function (exports, require, module, __filename, __dirname) { �������������
���
npm ERR! ^
npm ERR! Unexpected token ILLEGAL
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
The package.json contains:
{
"private": true,
"scripts": {
"prod": "gulp --production",
"dev": "gulp watch"
},
"devDependencies": {
"gulp": "^3.9.1",
"laravel-elixir": "^5.0.0",
"bootstrap-sass": "^3.0.0"
}
}
Do you guys see the problem?
I reinstalled NodeJs. That was the problem..
Related
I am a newbie and I am trying to run npm run-script watch command and it gives me that error:
Error: ENOENT: no such file or directory, scandir
Log:
> scroller#1.0.0 watch C:\JOB\promocatalog\front
> webpack --mode development --progress --watch
C:\JOB\promocatalog\front\node_modules\webpack-cli\bin\cli.js:93
throw err;
^
Error: ENOENT: no such file or directory, scandir
at Object.readdirSync (fs.js:974:3)
at Object.<anonymous> (C:\JOB\promocatalog\front\webpack.config.js:26:26)
at Module._compile (C:\JOB\promocatalog\front\node_modules\v8-compile-cache\v8-compile-cache.js:194:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14)
at Module.require (internal/modules/cjs/loader.js:1089:19)
at require (C:\JOB\promocatalog\front\node_modules\v8-compile-cache\v8-compile-cache.js:161:20)
at WEBPACK_OPTIONS (C:\JOB\promocatalog\front\node_modules\webpack-cli\bin\utils\convert-argv.js:114:13)
at requireConfig (C:\JOB\promocatalog\front\node_modules\webpack-cli\bin\utils\convert-argv.js:116:6)
at C:\JOB\promocatalog\front\node_modules\webpack-cli\bin\utils\convert-argv.js:123:17
at Array.forEach (<anonymous>)
at module.exports (C:\JOB\promocatalog\front\node_modules\webpack-cli\bin\utils\convert-argv.js:121:15)
at C:\JOB\promocatalog\front\node_modules\webpack-cli\bin\cli.js:71:45
at Object.parse (C:\JOB\promocatalog\front\node_modules\yargs\yargs.js:576:18)
at C:\JOB\promocatalog\front\node_modules\webpack-cli\bin\cli.js:49:8
at Object.<anonymous> (C:\JOB\promocatalog\front\node_modules\webpack-cli\bin\cli.js:366:3)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14)
at Module.require (internal/modules/cjs/loader.js:1089:19)
at require (internal/modules/cjs/helpers.js:73:18)
at Object.<anonymous> (C:\JOB\promocatalog\front\node_modules\webpack\bin\webpack.js:156:2)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
errno: -4058,
syscall: 'scandir',
code: 'ENOENT'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scroller#1.0.0 watch: `webpack --mode development --progress --watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scroller#1.0.0 watch 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\Stepa\AppData\Roaming\npm-cache\_logs\2020-07-08T14_34_22_349Z-debug.log
Can anyone help me with this?
This is a VUE JS MASONRY project on the GitHub. I just trying to run
it. I've already run the npm install before run it. It seems like the
all the packages have been installed properly.
PS C:\Users\Administrator\Downloads\vue-masonry-plugin-demo-master>npm start
> vue-masonry-demo#1.0.0 start C:\Users\Administrator\Downloads\vue-masonry-plugin-demo-master
> node build/dev-server.js
> Starting dev server...
events.js:187
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE: address already in use :::8080
at Server.setupListenHandle [as _listen2] (net.js:1300:14)
at listenInCluster (net.js:1348:12)
at Server.listen (net.js:1436:7)
at Function.listen (C:\Users\Administrator\Downloads\vue-masonry-plugin-demo-master\node_modules\express\lib\application.js:618:24)
at Object.<anonymous> (C:\Users\Administrator\Downloads\vue-masonry-plugin-demo-master\build\dev-server.js:83:18)
at Module._compile (internal/modules/cjs/loader.js:956:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
at Module.load (internal/modules/cjs/loader.js:812:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)
at internal/main/run_main_module.js:17:11
Emitted 'error' event on Server instance at:
at emitErrorNT (net.js:1327:8)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
code: 'EADDRINUSE',
errno: 'EADDRINUSE',
syscall: 'listen',
address: '::',
port: 8080
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-masonry-demo#1.0.0 start: `node build/dev-server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-masonry-demo#1.0.0 start 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\Administrator\AppData\Roaming\npm-cache\_logs\2020-02-05T22_23_37_278Z-debug.log
PS C:\Users\Administrator\Downloads\vue-masonry-plugin-demo-master>
PACKAGE.JSON
{ "name": "vue-masonry-demo", "version": "1.0.0",
"description": "A Vue.js project", "author": "Mikhail Kuznetcov
", "private": true, "scripts": {
"dev": "node build/dev-server.js",
"start": "node build/dev-server.js",
"build": "node build/build.js" },
Error: listen EADDRINUSE: address already in use :::8080
If you check it here, you will figure it out.
I have been trying to run babel and live-server locally , however when calling for 'npm run build' or 'npm run serve' I get the following error:
> boilerplate#1.0.0 serve C:\Users\sasaa\OneDrive\Documents\HTMl&CSS\j-14-05-globals\boilerplate
> live-server public
'CSS\j-14-05-globals\boilerplate\node_modules\.bin\' is not recognized as an internal or external command,
operable program or batch file.
internal/modules/cjs/loader.js:969
throw err;
^
Error: Cannot find module 'C:\Users\sasaa\OneDrive\Documents\live-server\live-server.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:17)
at Function.Module._load (internal/modules/cjs/loader.js:859:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! boilerplate#1.0.0 serve: `live-server public`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the boilerplate#1.0.0 serve 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\sasaa\AppData\Roaming\npm-cache\_logs\2020-01-05T00_21_18_216Z-debug.log
This is the package-json:
{
"name": "boilerplate",
"version": "1.0.0",
"description": "",
"main": "input.js",
"scripts": {
"serve": "live-server public",
"build": "babel src/index.js --out-file public/scripts/bundle.js --presets env --watch"
},
"author": "",
"license": "ISC",
"dependencies": {
"babel-cli": "^6.26.0",
"babel-preset-env": "^1.6.1",
"live-server": "^1.2.1"
}
}
I am using Windows 10 with Git Bash
npm version 6.13.4
node v13.5.0
Any suggestions how to solve this issue?
I am trying to install babel watch after I have installed babel
my json file is as follows
{
"name": "t3",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "babel server.js --out-dir build",
"dev-start": "babel-watch server.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.17.1"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-watch": "^7.0.0"
}
}
but i am getting this error while running
npm run dev-start
t3#1.0.0 dev-start C:\Users\PRO\Desktop\t3
babel-watch server.js
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module '#babel/core'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (C:\Users\PRO\Desktop\t3\node_modules\babel-watch\babel-watch.js:7:15)
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) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! t3#1.0.0 dev-start:
babel-watch server.js npm ERR! Exit status 1 npm ERR! npm ERR!
Failed at the t3#1.0.0 dev-start script. npm ERR! This is probably not
a problem with npm. There is likely additional logging output above.
[Update]
You might have update the babel. check out https://github.com/babel/babel/issues/8908 & How to upgrade to babel 7
Try
npm install #babel/core --save
Hi whenever I try to run the npm run dev in the terminal on pet-shop-project tutorial, it comes up with a long list of error here below the error.
hope to solve the issue by your help.
Thanks in advance.
PS C:\pet-shop-tutorial> npm run dev
> pet-shop#1.0.0 dev C:\pet-shop-tutorial
> lite-server
npm : C:\Users\Ali\AppData\Roaming\npm\node_modules\lite-server\lib\lite-server.js:33
At line:1 char:1
+ npm run dev
+ ~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (C:\Users\Ali\Ap...te-server.js:33:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
throw (err);
^
SyntaxError: C:\pet-shop-tutorial\bs-config.json: Unexpected token } in JSON at position 70
at JSON.parse (<anonymous>)
at Object.Module._extensions..json (module.js:671:27)
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 start (C:\Users\Ali\AppData\Roaming\npm\node_modules\lite-server\lib\lite-server.js:28:17)
at Object.<anonymous> (C:\Users\Ali\AppData\Roaming\npm\node_modules\lite-server\bin\lite-server:7:30)
at Module._compile (module.js:652:30)
npm
ERR!
code
ELIFECYCLE
npm
ERR!
errno
1
npm
ERR!
pet-shop#1.0.0 dev: `lite-server`
npm
ERR!
Exit status 1
npm
ERR!
npm
ERR!
Failed at the pet-shop#1.0.0 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\Ali\AppData\Roaming\npm-cache\_logs\2018-05-30T01_41_54_260Z-debug.log
bs-config-json contents
{
"server": {
"baseDir": ["./src", "./build/contracts"],
}
}
The content of bs-config.json isn't valid JSON. You have an extra comma after the array. It should look like this:
{ "server": { "baseDir": ["./src", "./build/contracts"] } }
That's why you get this error:
SyntaxError: C:\pet-shop-tutorial\bs-config.json: Unexpected token } in JSON at position 70
You can validate your JSON using a JSON validator like https://jsonlint.com/.