I am battling to get Laravel 9 and bootstrap 5 auth working.
Windows 10
php v8.1.6
node v18.12.1
npm v9.1.3
composer create-project laravel/laravel test
composer require laravel/ui
php artisan ui bootstrap --auth
npm install
npm run dev
I get the following error when running step 5:
failed to load config from
C:\Dropbox#Work#Development\www\test\vite.config.js error when
starting dev server: Error: cannot test case insensitive FS,
CLIENT_ENTRY does not point to an existing file:
C:\dist\client\client.mjs
at testCaseInsensitiveFS (C:\Dropbox#Work#Development\www\test\node_modules\vite\dist\node-cjs\publicUtils.cjs:3432:15)
at Object. (C:\Dropbox#Work#Development\www\test\node_modules\vite\dist\node-cjs\publicUtils.cjs:3437:1)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at _require.extensions. [as .js] (file:///C:/Dropbox/%23Work/%23Development/www/test/node_modules/vite/dist/node/chunks/dep-67e7f8ab.js:62854:17)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at Module.require (node:internal/modules/cjs/loader:1061:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object. (C:\Dropbox#Work#Development\www\test\node_modules\vite\index.cjs:7:31)
Related
I'm trying to add websocket to my webserver by simply following this guide using a Beaglebone:
https://www.w3schools.com/nodejs/nodejs_raspberrypi_webserver_websocket.asp
However, I'm getting this error:
tugbars#beaglebone:~$ sudo node webserver1.js
/home/tugbars/node_modules/ws/lib/websocket.js:347
...options
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/tugbars/node_modules/ws/index.js:3:19)
I think the problem is at
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.3/socket.io.js"></script>
this part but I couldn't figure out how to solve it.Thanks for help.
Extra information. I have downloaded socket.io as sudo. When i type npm list socket.io, I'm getting the version of the installed socket.io. Node is also at it's last version.
You almost certainly have an outdated version of Node that doesn't have support for the spread operator (foo = { ...options }) or for destructuring (const { x, ...options } = foo). Update to a newer version of Node (12.14.1 is the latest stable release).
Also, you mention “downloading socket.io as sudo”, possibly referring to installing the node module, but you also shared an HTML script tag showing a Cloudflare hosted version. You might want to make sure you understand how you're loading that library before proceeding.
I have been trying to get the spec tests running from the rxjs repository on the WebStorm IDE.
https://github.com/ReactiveX/rxjs.git
The issue is that I can run the tests using the included script, and manually through the command line but configuring WebStorm is not working.
Below is the error message that I am getting most frequently. I have included the default opts file for Mocha, and below is the result.
ReferenceError: asDiagram is not defined
at Suite.<anonymous> (/Users/test/Desktop/Test/rxjs/spec/Observable-spec.ts:636:3)
at Object.create (/Users/test/Desktop/Test/rxjs/node_modules/mocha/lib/interfaces/common.js:112:19)
at context.describe.context.context (/Users/test/Desktop/Test/rxjs/node_modules/mocha/lib/interfaces/bdd.js:44:27)
at Object.<anonymous> (/Users/test/Desktop/Test/rxjs/spec/Observable-spec.ts:635:1)
at Module._compile (module.js:652:30)
at Module.m._compile (/Users/test/Desktop/Test/rxjs/node_modules/ts-node/src/index.ts:430:23)
at Module._extensions..js (module.js:663:10)
at Object.require.extensions.(anonymous function) [as .ts] (/Users/test/Desktop/Test/rxjs/node_modules/ts-node/src/index.ts:433:12)
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)
the problem occurs because Webstorm is passing --ui bdd to mocha, overwriting your custom ui specified in spec/support/default.opts. To work out the issue, you have to change User interface: option in Mocha run configuration from default (bdd) to your custom one (spec/helpers/testScheduler-ui.ts) - field is editable, you can type/paste the value. Configuration that works fine for me:
I am trying to use Laravel Mix in my Laravel Project and just setting up using this configuration:
Laravel Mix : ^1.0
webpack.mix.js
let mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix
.js('resources/assets/admin/js/app.js', 'public/assets/admin');
Running npm run dev i am getting this error:
$ npm run dev
> # dev c:\Users\user\laravel
> npm run development
> # development c:\Users\user\laravel
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress
--hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
undefined:3
}
^
SyntaxError: Unexpected token } in JSON at position 26
at Object.parse (native)
at babelrc (c:\Users\user\laravel\node_modules\l
aravel-mix\src\config.js:212:36)
at global.tap (c:\Users\user\laravel\node_module
s\laravel-mix\src\helpers.js:10:5)
at Object.babel (c:\Users\user\laravel\node_modu
les\laravel-mix\src\config.js:210:13)
at module.exports (c:\Users\user\laravel\node_mo
dules\laravel-mix\src\builder\webpack-rules.js:15:33)
at WebpackConfig.buildRules (c:\Users\user\laravel\node_modules\laravel-mix\src\builder\WebpackConfig.js:81:41)
at WebpackConfig.build (c:\Users\user\laravel\no
de_modules\laravel-mix\src\builder\WebpackConfig.js:25:14)
at Object.<anonymous> (c:\Users\user\laravel\nod
e_modules\laravel-mix\setup\webpack.config.js:26:38)
at Module._compile (module.js:570:32)
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 (internal/module.js:20:19)
at requireConfig (c:\Users\user\laravel\node_mod
ules\webpack\bin\convert-argv.js:97:18)
I am not sure about this error. It seems like the error is with the laravel-mix source code but when i upgrade to 1.6 also i am getting the same error.
Also i have added and removed all the codes in my app.js but the error is same.
Note:
It works with 0.8 version though.
I'm using Laravel 5 and I want use sass.
I changed gulpfile.js from less to sass.
var elixir = require('laravel-elixir');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Laravel application. By default, we are compiling the Less
| file for our application, as well as publishing vendor resources.
|
*/
elixir(function(mix) {
mix.sass('app.scss')
.coffee();
});
however when I run gulp watch, It failed.
[take#take]% gulp watch
[18:24:45] Using gulpfile ~/Sites/myapp/gulpfile.js
[18:24:45] Starting 'watch'...
[18:24:45] Starting 'sass'...
[18:24:45] 'sass' errored after 10 ms
[18:24:45] Error: Module did not self-register.
at Error (native)
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> (/Users/take/Sites/myapp/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass/lib/index.js:211:15)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
Error running task sequence: { task: 'sass',
message: 'sass catch',
duration: 0.010338111,
hrDuration: [ 0, 10338111 ],
err: [Error: Module did not self-register.] }
[18:24:45] Finished 'watch' after 17 ms
node -v is v0.12.0.
It my be problem about node version.
https://github.com/dlmanning/gulp-sass/issues/152
I downgrade to node v0.10.36, then gulp watch works well.
I did
sudo npm update
and it worked for me.
I cannot figure out how to get the twilio npm module working on a heroku dyno using meteor js. It works great on localhost, but it crashes on heroku. This is how I built my heroku app:
heroku create meteorherokutwilio --stack cedar --buildpack https://github.com/oortcloud/heroku-buildpack-meteorite.git
heroku config:add ROOT_URL=http://meteorherokutwilio.herokuapp.com/
heroku labs:enable websockets -a meteorherokutwilio
git push heroku master
I've added twilio to my meteor project like this:
mrt add twilio
This is how I'm loading twilio:
var client = Npm.require('twilio')("key", "secret");
This is the error:
/app/.meteor/heroku_build/app/programs/server/boot.js:186
}).run();
^
Error: Cannot find module 'twilio'
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.Npm.require (/app/.meteor/heroku_build/app/programs/server/boot.js:88:18)
at app/meteor-heroku-twilio.js:18:24
at /app/.meteor/heroku_build/app/programs/server/boot.js:159:61
at Array.forEach (native)
at Function._.each._.forEach (/app/.meteor/heroku_build/app/programs/server/node_modules/underscore/underscore.js:79:11)
at /app/.meteor/heroku_build/app/programs/server/boot.js:159:5
Process exited with status 8
State changed from starting to crashed
I've also made a git repo with the minimum amount of code to demonstrate the problem: https://github.com/esromneb/meteor-heroku-twilio/
Npm.require works only for standard node packages (well, it works for packages it found installed, but you should only rely on it for standard packages, unless you want to manually add packages to your Heroku server and each server you'd like to run in the future).
For all other npm packages, there's npm meteorite package.
Add it to your project with mrt add npm command.
Then create packages.json file with a list of all required packages, for example:
{
"twilio": "1.5.0",
"oauth": "0.9.11"
}
Afterwards, include your package with Meteor.require:
var client = Meteor.require('twilio')("key", "secret");