Drush can't update : Cannot redeclare system_help - drupal-6

I am trying to use drush to update my drupal core but in some cases (not all) I get
PHP Fatal error: Cannot redeclare system_help() (previously declared in /mysite/modules/system/system.module:46) in /mysite/sites/all/modules/drupal-6.22/modules/system/system.module on line 105
Drush command terminated abnormally due to an unrecoverable error.
Any idea on how to solve this?
Regards.

I had a similar issue, checked and there was inside the core module folder another module folder like:
www/module
www/module/module
Fixed the issue by reinstalling from scratch that drupal build and also upgraded my version of drush.

I had this same problem and it turns out I (as the system admin) had installed drush globally. The developer had installed it as a system module inside of sites/all/modules.
I removed the sites/all/modules/drush for the site and then was able to drush up as normal.

Related

Is there any way to skip hoisting during yarn build?

Recently I have updated the node version to 16+. Prior to that, I was able to trigger the yarn build command to create the build of my project.
But after installation of node 16+, the yarn build command is throwing the following errors
./lib/view-registration.js
Module not found: Error: Can't resolve 'hoisted/#msdyn365-commerce-modules/wishlist/dist/lib/modules/wishlist-items/wishlist-items.view.js' in 'H:\source\D365_eCommerce\lib'
# ./lib/view-registration.js 5:112769-113063
# ./node_modules/#msdyn365-commerce/bootloader/entry/client.js
# multi ./node_modules/#msdyn365-commerce/bootloader/entry/webpack-public-path.js ./node_modules/#msdyn365-commerce/bootloader/entry/client
It seems like it is trying to pick the module from the hoisted folder.
I am new to this concept so have no idea why it is targeting this folder in spite of this it should pick the module from '#msdyn365-commerce-modules/wishlist/dist/lib/modules/wishlist-items/wishlist-items.view.js' directly.
Any explanation would be appreciated.
How can I force it to not pick the module directly from the hoisted folder and use '#msdyn365-commerce-modules/wishlist/dist/lib/modules/wishlist-items/wishlist-items.view.js' directly
Thanks,
Aman
This issue mainly occurred due to the corrupt version of Node.
The only possible solution for this is to make sure that all the dependencies required for Node (16+) are also installed.
We can either download all the dependencies manually or just need to allow the node itself to download all the dependencies at the time of installation.
Thanks,
Aman

Exception could not locate binding file after updating electron version

I'm working on updating my project from using electron version 1.2.5
to the newest electron at this time which is 1.7.7 (atleast it was when I downloaded it). My node version 6.9.1.
I've encountered a problem when I start my project with this new electron version,
the error in general is about "could not locate the binding files. and it mostly regards the async module.
There is also some part of the exception regarding node-etcd module which I use in my project (version 5.0.3)
I found some information about this type of exception online but most of them says stuffs about rebuilding some node module using some npm commands which I didn't quiet understand. I tried to install async module again in a new folder and replace it (with its deps) in the node modules folder im currently using for my project, but I still got the same error.
I'm working in an offline enviorment where I can't take my project "out" to a computer with internet access, I can only bring things from the web to my project (like installing in some folder and then copying that into my project) so any npm or other commands that require web connection are not available to me directly on my work computer. (I can only use them in a different computer and copy the results to a flash drive and bring them to th
Here's 2 pictures of the error (sorry about the quality, its the best I could get):
First part of error
Second part of error
The solution that fixed the problem in my case was going into node_modules - > deasync - > index.js
Before line 31 I added a newline (next to the binding line)
and wrote:
modPath = __dirname;
This solution is hacky, it was accually ly found by an associate a while back, so I am not sure why it works, it might be an issue in deasync, but it fixed the problem.

Intellij Idea run configuration with ember.js on ubuntu

I am having a problem with the run configuration of ember on intellij idea on ubuntu 14.
I have installed ember using npm and I have followed a tutorial on my teacher's site on how to correctly configure intellij to use both maven and ember. I had no problem configuring the first part (maven), however at the second part, which was basically the same, I couldn't find the file he was refering to. Here is the picture:
tutorial
And here is the error:
[error]
Error: No ember-cli-build.js found. Please see the transition guide: https://github.com/ember-cli/ember-cli/blob/master/TRANSITION.md#user-content-brocfile-transition.
at CoreObject.module.exports.Task.extend.setupBroccoliBuilder (/home/user/.nvm/versions/node/v5.0.0/lib/node_modules/ember-cli/lib/models/builder.js:56:13)
at CoreObject.module.exports.Task.extend.init (/home/user/.nvm/versions/node/v5.0.0/lib/node_modules/ember-cli/lib/models/builder.js:89:10)
at CoreObject.superWrapper [as init] (/home/user/.nvm/versions/node/v5.0.0/lib/node_modules/ember-cli/node_modules/core-object/lib/assign-properties.js:32:18)
at CoreObject.Class (/home/user/.nvm/versions/node/v5.0.0/lib/node_modules/ember-cli/node_modules/core-object/core-object.js:32:33)
at CoreObject.module.exports.Task.extend.run (/home/user/.nvm/versions/node/v5.0.0/lib/node_modules/ember-cli/lib/tasks/build.js:15:19)
at /home/user/.nvm/versions/node/v5.0.0/lib/node_modules/ember-cli/lib/commands/build.js:32:24
at lib$rsvp$$internal$$tryCatch (/home/user/.nvm/versions/node/v5.0.0/lib/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1036:16)
at lib$rsvp$$internal$$invokeCallback (/home/user/.nvm/versions/node/v5.0.0/lib/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1048:17)
at /home/user/.nvm/versions/node/v5.0.0/lib/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:331:11
at lib$rsvp$asap$$flush (/home/user/.nvm/versions/node/v5.0.0/lib/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1198:9)
Could you please help me find the file he was referring to in the tutorial (since "usr/bin" doesn't have any "ember" files)?
New error about permissions:
error
Do you have a brocfile.js in your project? If so, rename it to ember-cli-build... Apparently you installed a newer version of ember... You might want to re-run ember init
Have a look at https://github.com/ember-cli/ember-cli/blob/master/TRANSITION.md#user-content-brocfile-transition as well for more information.
Depending on how you installed ember/ember-cli it would lie under (if you don't use nvm):
~/.npm/
or
in your project structure:
<project_dir>/node_modules and <project_dir>/bower_components
Maybe you didn't initialize ember project. Run ember init in webapp directory

Reinstalling drupal module

I had trouble with the Open layer module in Drupal I therefore decided to reinstall it. I think I have done it properly. First I disabled the modules and then I unistalled them. When I should install the module again I could not do it because I get a massage that the module already was installed. When I looked in the module list I discovered that the modules still was there but disabled. It was not in the uninstall list and the directories was erased and the tables was not there.
I do not what to do to be able to install the module again.
Hope someone can help.
Sorry!
I had wrong. The directories in the module map was not erased. Did that and it all works fine.

Error code: 800A1391 Source: Microsoft JScript runtime error Running Grunt - Module is undefined

New Grunt user here who is using a lot of new tools (npm nodejs) today.
I've got Grunt "installed" and have been able to create a grunt.js file using the init task as described here: http://net.tutsplus.com/tutorials/javascript-ajax/meeting-grunt-the-build-tool-for-javascript/ and here: https://github.com/cowboy/grunt/blob/master/docs/getting_started.md. But whenever I run the "grunt" command I get an error:
Windows Script Host
Script: c:\users\[]\Documents\code\grunt\grunt.js
Line: 2
Char: 1
Error: 'module' is undefined
Code: 800A1391
Source: Microsoft JScript runtime error
As explained in the FAQ, you need to type grunt.cmd instead on Windows because the OS tries to launch grunt.js
Or you can install grunt-cli globally instead. This package will run any version of Grunt if it's been installed locally to your project.
SOLVED !!
So, this problem occur because windows by default associative < *.js > files
with >>
"Microsoft Windows Based Script Host".
grunt need to open by default with (grunt.cmd).
it easy to slove, by change default app (open with..)
Guide :
Go to any javascript file with "js" extension. (any file)
Right-Click(mouse) > Properties > "Opens with:" Change...(button)
Choose Notepad ( or any javascript IDE ).
PROBLEM SOLVED ! :)
good luck
If you're getting a "Microsoft JScript runtime error" that means that node.js isn't even getting invoked; instead Windows Script Host is trying to run your code. That's probably a problem with filetype associations; IIRC Windows defaults to trying to execute a ".js" file with WSH. You may wind up having to create a shortcut to your script, specifying a command line (probably something like "node %1") and a starting directory in order to make sure that it's executed properly.
It would help if you could tell us exactly how you're trying to invoke your code.
it seems that in the latest versions of the grunt modules, you would have to do the following to have it work under windows:
remove any globally installed grunt
npm uninstall -g grunt
install grunt-cli globally
npm install -g grunt-cli
install grunt locally into your project
npm install grunt
installing grunt (v0.4.x) globally does not seem to create the necessary grunt.cmd anymore. it seems that the recommendation is now to have grunt installed locally to be able to use version-specific Gruntfiles
As Florian F suggested, running grunt.cmd works. This is because of the process Windows is looking for your grunt command.
When typing grunt -h Windows will proceed to look for the following files:
./grunt.cmd
./grunt.* (grunt.js is found in this case which is why you see "module is undefined")
%APPDATA%/npm/grunt.cmd
An alternative to using "grunt.cmd" is to use grunter which simply renames the command to grunter... then you no longer have this problem.
To answer this, first we need to understand that the error is caused because it is being executed by Windows Script Host.
Now, run the code from your cmd promt with the following syntax:
>node <application_name>.js
this will allow the Node.js application to open through V8 JavaScript engine(Google's).
P.S: Please reply back if this has helped in resolving your issue else post the problem you are facing after trying this.
I had a similar issue, the problem is file association, I would recommend:
right click on a .js file and choose open with.
then you choose nodejs/node.exe (somewhere in "program files" folder
then make tick box where it says "always open .js files " (paraphrasing)
That should do the trick.
I went through the same issue when running an old Node project.
The issue was with the name of the js file, it was node.js. So the while running the command node node.js, it was opening up a windows dialogue box.
I just changed the name of the file to app.js and the error flew away.
So, in my case i had tryed all the mentioned above with no result.
But i have fund that im dont type: node in the full sentence as the following snipet
node script.js.And remember never understimate your own miscoding.
Solution:
Go to any javascript file with "js" extension. (any file)
Right-Click(mouse) > Properties > "Opens with:" Change...(button)
Choose Notepad ( or any Javascript IDE like VS Code ).

Resources