• 0
Votes
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /var/www/html/cnasolution/application/views/question.php
Line: 191
Function: _error_handler

File: /var/www/html/cnasolution/application/controllers/Questions.php
Line: 419
Function: view

File: /var/www/html/cnasolution/index.php
Line: 315
Function: require_once

I added semantic-ui gem in gemfile everything is working fine but dropdown menu is not working. I did not find any solution anywhere,
is this an issue in gem to use in rails6?
here is javascript code in application.js file.

require("jquery") require("@rails/ujs").start() require("turbolinks").start() require("@rails/activestorage").start() require("channels") require("semantic-ui") require("bootstrap/dist/js/bootstrap")  // Uncomment to copy all static images under ../images to the output folder and reference // them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>) // or the `imagePath` JavaScript helper below. // // const images = require.context('../images', true) // const imagePath = (name) => images(name, true) $(document).on('turbolinks:load', function(){     $('.ui .dropdown').dropdown(); }) 

I got this error in console in chrome development tool.

Uncaught Error: Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Package exports for '/Users/letsventure/Project/message_me/node_modules/@babel/helper-compilation-targets' do not define a '.' subpath     at applyExports (internal/modules/cjs/loader.js:485)     at resolveExports (internal/modules/cjs/loader.js:508)     at Function.Module._findPath (internal/modules/cjs/loader.js:577)     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:879)     at Function.Module._load (internal/modules/cjs/loader.js:785)     at Module.require (internal/modules/cjs/loader.js:956)     at require (Users/letsventure/Project/message_me/node_modules/v8-compile-cache/v8-compile-cache.js:161)     at Object. (Users/letsventure/Project/message_me/node_modules/@babel/preset-env/lib/debug.js:8)     at Module._compile (Users/letsventure/Project/message_me/node_modules/v8-compile-cache/v8-compile-cache.js:192)     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1103)     at Module.load (internal/modules/cjs/loader.js:914)     at Function.Module._load (internal/modules/cjs/loader.js:822)     at Module.require (internal/modules/cjs/loader.js:956)     at require (Users/letsventure/Project/message_me/node_modules/v8-compile-cache/v8-compile-cache.js:161)     at Object. (Users/letsventure/Project/message_me/node_modules/@babel/preset-env/lib/index.js:11)     at Module._compile (Users/letsventure/Project/message_me/node_modules/v8-compile-cache/v8-compile-cache.js:192)     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1103)     at Module.load (internal/modules/cjs/loader.js:914)     at Function.Module._load (internal/modules/cjs/loader.js:822)     at Module.require (internal/modules/cjs/loader.js:956)     at require (Users/letsventure/Project/message_me/node_modules/v8-compile-cache/v8-compile-cache.js:161)     at requireModule (Users/letsventure/Project/message_me/node_modules/@babel/core/lib/config/files/plugins.js:165)     at loadPreset (Users/letsventure/Project/message_me/node_modules/@babel/core/lib/config/files/plugins.js:83)     at createDescriptor (Users/letsventure/Project/message_me/node_modules/@babel/core/lib/config/config-descriptors.js:154)     at Users/letsventure/Project/message_me/node_modules/@babel/core/lib/config/config-descriptors.js:109     at Array.map ()     at createDescriptors (Users/letsventure/Project/message_me/node_modules/@babel/core/lib/config/config-descriptors.js:109)     at createPresetDescriptors (Users/letsventure/Project/message_me/node_modules/@babel/core/lib/config/config-descriptors.js:101)     at presets (Users/letsventure/Project/message_me/node_modules/@babel/core/lib/config/config-descriptors.js:47)     at mergeChainOpts (Users/letsventure/Project/message_me/node_modules/@babel/core/lib/config/config-chain.js:320)     at Object../app/javascript/packs/application.js (bootstrap:83)     at __webpack_require__ (bootstrap:19)     at bootstrap:83     at bootstrap:83 

if you want to know more about code used in this project please comment.

Download script demo [LINK]
Download script demo [LINK 2] Download script demo [LINK 2]