I installed AdminJS and was trying to run my application but I am coming across this Error
It says:
Error: Cannot find module '#adminjs/design-system'
Even though design-system exists and I even added it as a require statement
const AdminJSDesignSystem = require("./#adminjs/design-system");
I also tried installing it again but it gave a huge error
Right here
Please help me fix this. I have got here after being through so many errors and fixing them and even now these errors won't stop popping up.
looks like you are importing it using a relative path.
You should change that to just the package name
e.g. const AdminJSDesignSystem = require("#adminjs/design-system");
You need to do something like this:
const AdminJSDesignSystem = require("#adminjs/design-system");
Make sure you have followed the official guide of AdminJS and adminjs/design-system that:
You have the admin user right to install things on your machine.
You have installed one of Express, Hapi and Koajs. If not,
npm install express express-formidable
You have installed AdminJS. If not,
npm install adminjs #adminjs/express
Finally, install according to the official doc:
npm install styled-components #adminjs/design-system
Related
I'm sure this is very simple as I am just starting back to learn JavaScript. I understand the basics, the logic, but I've only ever done simple scripts embedded in HTML many years ago.
version I get the error:
Cannot find module prompt-script
I have installed the library using the following command with only 1 warning about missing
repository in the JSON.
npm install --save #types/prompt-sync
I also tried to delete the installed files and do it like:
C:\Users\Username\Project>npm install --save #types/prompt-sync
When it couldn't find the module the first time.
The script is very simple:
var prompt = require('prompt-sync')();
//
// get input from the user.
//
var n = prompt('How many more times? ');
This of course is not what I wanna write but I must have the library installed wrong since I can't find the module. Any help is greatly appreciated. I'm sure it's something really simple.
Thank you
You are installing #types/prompt-sync (the TypeScript definitions for prompt-sync - even though you aren't using TypeScript) but requiring prompt-sync.
You have to install the package you are actually requiring, prompt-sync:
npm i prompt-sync
I am unable to npm start my old React projects (created in October and before, ex: https://github.com/DebojyotiRoy15/Calculator-app). When I try to do it, I get the following error:
I have tried various things suggested in stackoverflow to solve this error, like adding a .env file to the root, deleting package-lock, deleting node modules and then installing them. But still this error persists. Please help me to resolve this.
I managed to run your app without any issues, check it out here https://codesandbox.io/s/wizardly-dream-s5w2e. Your error is probably due to some package resolving behavior of Node.JS. Try renaming the C:\Users\Pavilion\node_modules\babel-jest", and if it didn't help then run npm i babel-jest --save-dev and reload your app again.
Im using ember to develop a project.
Please help me with this error. Im unable to run my project on local. After hitting
ember server the build is successful. But on hitting the http://localhost:4200
Loads empty page with console error.
Uncaught Error: Assertion Failed: The initializer 'App Version' has already been registered
at assert (index.js:172)
at Function.initializer (index.js:420)
at registerInitializers (index.js:27)
at loadInitializers (index.js:68)
at Module.callback (app.js:25)
at Module.exports (loader.js:106)
at requireModule (loader.js:27)
at app-boot.js:3
Unable to understand what to do. Any help regarding this would be appreciated.
I did a code search to see where that initializer might exist and it looks to be part of ember-cli-app-version.
In your place I would remove ember-cli-app-version from your app with npm uninstall --save-dev ember-cli-app-version and then run ember serve again. The purpose of this addon is to make it easy to see your app's version number in the ember inspector, but that's not a big deal so removing it won't break anything and should get you moving forward.
If you want to investigate the issue further try searching your code base (including node_modules) for App Version to see where a duplicate exists.
Running npm install solved the problem.
The actual issue was due to the iCloud sync being active in my Macbook.
Turning iCloud sync off should solve the problem.
I installed both the meteor-npm package and the crypto npm package. After starting Meteor, the console outputs
npm: updating npm dependencies -- crypto
However when I tried using the npm package within the server:
var Crypto = Npm.require('crypto')
I get the error
Error: Cannot find module 'crypto'
Next I tried
var Crypto = Meteor.require('crypto')
and I get the error
Error: Cannot find module '/Users/athenawisdoms/app/.meteor/local/build/programs/server/npm/npm/main/node_modules/crypto'
I noticed the npm package is present at /packages/npm/.npm/package/node_modules/crypto and at /.meteor/local/build/programs/server/node_modules/npm/node_modules/crypto but not at /Users/athenawisdoms/app/.meteor/local/build/programs/server/npm/npm/main/node_modules/ as mentioned in the error message.
Did the installation go wrong?
I ran into this issue as well. I'm pretty sure this is a bug in the way Meteor interacts with NPM, and so I've created a replication of the problem and filed an issue. However, I soon realized that it was a red herring, as the package I was using actually wanted to use Node's crypto module and not the NPM one. Are you sure that this is not the case with your package as well?
I have a feeling this may be related to the fact that the doubly named crypto modules are probably trampling on each other.
I have installed Meteorite on my mac, and am trying to run the test program provided as a mysql project. When I use the command 'mrt', I get:
Stand back while Meteorite does its thing
Done installing smart packages
Ok, everything's ready. Here comes Meteor!
[[[[[ /Users/lfrey/Desktop/Thesis/test-meteor-sql ]]]]]
=> Errors prevented startup:
While building the application:
node_modules/meteor/app/lib/unsupported.html:1: Can't set DOCTYPE here. (Meteor sets for you)
node_modules/meteor/app/meteor/meteor.js:1:15: Unexpected token ILLEGAL
=> Your application has errors. Waiting for file change.
I have tried re-installing nom, meteor, meteorite, and mysql in various combinations and have not been able to eliminate the error. If I remove the command, then I get an error about invalid HTML syntax.
Your app might not be created properly. You have a node_modules directory in your application which you might have added with npm install.
Meteor does not install modules with npm install manually, it doesn't work because it parses files in the node_moules directory as part of your meteor app (in the wrong way - not as an npm module).
You have to make sure the package you use uses Npm.depends in your package's package.js. The standard Meteor-SQL package already does this for you so you don't have to worry about it.
Which SQL package did you use? As far as I can see none of them install anything with npm install nor do they have instructions to.
The simple fix to get your app working is to remove the modules you installed by deleting the node_modules directory in your app.