I recently started on ember JS.
I am trying to import bootstrap.css file from "node_modules\bootstrap\dist\css\bootstrap.css"
But when i run the server its shows error like
Error: ENOENT: no such file or directory, open 'E:\For Saving\ember\project2\new_project\tmp\simple_concat-input_base_path-JBlVqJm6.tmp\node_modules\bootstrap\dist\css\bootstrap.css'
It is adding some path with my path and giving me this error. I search a lot to solve this but i can't. And Also i installed the bower via npm and the bower_component is not getting added into my project folder.
Last thing I am not good with command Line Interface. can i run ember without terminal?
You can't app.import node modules files. It's only for bower components and vendor folder.
Reference from ember-cli documentation.
Related
I am currently trying to get started with react native.
I set up the development environment referring to the documentation, but can't even pass the first step and create an empty project.
I am on Windows 11, Node 16.15.1, and NPM 8.12.2
I keep getting the following error when trying to init react-ative project with expo init awesomeProject
Error downloading and extracting template package: Error: npm exited with non-zero code: 1
× Something went wrong while downloading and extracting the template.
Can't read JSON file: D:\crna\awesomeProject\app.json
└─ Cause: Error: ENOENT: no such file or directory, open 'D:\crna\awesomeProject\app.json'
Does anyone has a suggestion ?
Don't really know what is the problem but i found a soluion that might help other people in the same situation as me! like said here just run in CMD instead of GitBash
Use sudo if on linux. And maybe Admin on windows.
So the host that I use for my discord bot died so I downloaded all the code and tried hosting it on my PC. But I get the following error.
Error: Cannot find module '/home/container/index.js
I've tried everything I can:
updated nodejs
reinstalled all my packages
Changed package.json
How can I fix this?
Cannot find module means you are trying to run non-existent file.
Ensure there is index.js in your working directory. If not,
Use cd to go to the directory where it is (usually it's src near the package.json)
Run node ./index.js
Many time people have just the problem of command line to run file,
as windows and linux have
different syntax to run .js file
i.e. node ./index.js for linux
and node .\index.js for windows
I am trying to create a migration script on an existing project with already initialized migrate-mongo. I'm using windows btw.
Here is my problem.
When I try to create a script using this command migrate-mongo create blacklist_the_beatles
I get this error.
ERROR: ENOENT: no such file or directory, lstat 'C:\Users\saadb\AppData\Roaming\npm\node_modules\migrate-mongo\samples\undefined\migration.js' Error: ENOENT: no such file or directory, lstat 'C:\Users\saadb\AppData\Roaming\npm\node_modules\migrate-mongo\samples\undefined\migration.js'
I am running the command from VS code terminal. Is this right or should I run it from somewhere else
Just add moduleSystem property in your migrate-mongo-config.js
It can be esm or commonjs, depends on which one you using. More details here - https://github.com/seppevs/migrate-mongo/blob/49e6de971bc9581ce3a2321da2180a7877aff3a6/samples/esm/migrate-mongo-config.js
Running the following code solved the problem:
npx migrate-mongo create blacklist_the_beatles
Seems very weird, buy I was able to solve the issue by manually creating "undefined" folder in the prompted path, and I also put there all files from commonjs folder.
I've installed ts-node with NPM install, and tinkered with this for hours, I cant find any other documentation on the website as to why its not working. A quick google search has also turned up nothing; which is why I'm SURE its some small thing I'm missing. ts-node has also been installed globally AND in the project folder I'm getting the following error:
To import TypeScript files from quokka, `ts-node` module must be installed.
It is also recommended to install `tsconfig-paths` module for tsconfig.json paths mapping.
You may install the modules in your project or into quokka global folder by running `npm install ts-node tsconfig-paths` command inside the `~/.quokka/` folder.
at Module.load internal/modules/cjs/loader.js:653
at tryModuleLoad internal/modules/cjs/loader.js:593
at Function.Module._load internal/modules/cjs/loader.js:585
at require internal/modules/cjs/helpers.js:25
at Object.<anonymous> frontEnd/datrix/src/app/Logic/DeveloperTemplate.ts:1
at Module._compile internal/modules/cjs/loader.js:778
does anyone have some insight on how this can be done?
I figured it out, I had to open the project file in vs code, not the directory above it.
I have this error using ng new project_name:
An invalid configuration file was found ['angular.json']. Please delete the file before running the command.
I am getting this error I don't know how to get the solution.
I uninstalled #angular/cli and installed again
npm clean cache doesnt work too (I dont know if it is problem of my npm version
npm version is 6.4.1
node version is 8.11.1
what do i need to solve the problem?
If you are using the terminal of IntelliJ IDEA while there is a angular project already imported in the IDEA, it is the problem of the IDEA.So, open the command promt of your windows and create the project.
I did this and I was able to create the project.
The problem seems to be the _ in project_name resulting in the following error:
Schematic input does not validate against the Schema: {"name":"project_name","version":"6.0.1","newProjectRoot":"projects","skipInstall":false,"linkCli":false,"skipGit":false,"commit":null}
Errors:
Data path ".name" should match format "html-selector".
Replace _ e.g. with -.
Further readings:
Error when creating new project with Angular-CLI 6.1.2
Style Guide
Setting the working directory in IntelliJ's Karma task, to the Angular project's main directory, also fixes the problem.
I deleted the file in c:\users\XXX\.angular.json and it was running ok.
Run following if file is hidden. Open Terminal, run mv /Users/shivammishra/.angular.json /Users/shivammishra/angular.json.txt.
mv command will move the file to new location (angular.json.txt) and you can then delete.
Angular.js & Wrong Directions.
First of all, open a file called angular.js in the root folder.
And check if you add some wrong Directory. like the style or something like that. as example.
Suppose you add the bootstrap dependency and you want to add it to your project you will go to the angular.js and add it in the style configuration. so you will add it as the below:
"styles": [
"./node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.css"
],
Check if you add double dot .. not one dot in the path like the below:
"../node_modules/bootstrap/dist/css/bootstrap.min.css",
Or you maybe add it in the following format:
"/node_modules/bootstrap/dist/css/bootstrap.min.css",
or
"node_modules/bootstrap/dist/css/bootstrap.min.css",
The correct format is :
"./node_modules/bootstrap/dist/css/bootstrap.min.css",