I'm new to electron and I am trying to get it up and running on my machine. I am trying to follow along with a tutorial titled 'Creating Your First Desktop App With HTML, JS and Electron'.
I set up the folder where I wanted the files to be downloaded to and extracted them to it but after running npm intall (I did the npm start) an error showed up. this log came back. Please help me understand how to properly install or give file names need to make electron run.
I am using a windows 10 x64 machine.
here is the log
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Users\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm#3.10.5
3 info using node#v4.4.7
4 verbose stack Error: ENOENT: no such file or directory, open 'c:\Users\Desktop\WestHelper\package.json'
4 verbose stack at Error (native)
5 verbose cwd c:\Users\Desktop\WestHelper
6 error Windows_NT 10.0.10586
7 error argv "C:\Program Files\nodejs\node.exe"
"C:\Users\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "start"
8 error node v4.4.7
9 error npm v3.10.5
10 error path c:\Users\Desktop\WestHelper\package.json
11 error code ENOENT
12 error errno -4058
13 error syscall open
14 error enoent ENOENT: no such file or directory, open 'c:\Users\Desktop\WestHelper\package.json'
15 error enoent ENOENT: no such file or directory, open 'c:\Users\Desktop\WestHelper\package.json'
15 error enoent This is most likely not a problem with npm itself
15 error enoent and is related to npm not being able to find a file.
16 verbose exit [ -4058, true ]
the idea behind NPM is to install packages from package.json shipped with application, so everybody can download dependencies and packages used in project. Because of this, when you run npm install, it searches current directory for file named package.json and tries to read dependency tree from it. The message you posted says, it could not find any in directory c:\Users\Desktop\WestHelper\package.json
If I've found correct tutorial, there is a section called How it’s made where the content package.json file is present.
Hope it helped, have a wonderful day.
T
Related
My npm installs on windows 10 with the most up to date node.js and npm stable versions always fail when I enter the command npm install while cd'd into my project folder. This specific folder was set up with express as described here. Below is the relevant portion of the verbose failure log. I have no idea what is going wrong, can anyone help?
1315 verbose stack Error: ENOENT: no such file or directory, rename 'C:\Users\carte\Desktop\Queue\Queue\node_modules\amdefine' -> 'C:\Users\carte\Desktop\Queue\Queue\node_modules.amdefine.DELETE'
1316 verbose cwd C:\Users\carte\Desktop\Queue\Queue
1317 verbose Windows_NT 10.0.16299
1318 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\carte\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "--verbose"
1319 verbose node v8.11.0
1320 verbose npm v5.8.0
1321 error path C:\Users\carte\Desktop\Queue\Queue\node_modules\amdefine
1322 error code ENOENT
1323 error errno -4058
1324 error syscall rename
1325 error enoent ENOENT: no such file or directory, rename 'C:\Users\carte\Desktop\Queue\Queue\node_modules\amdefine' -> 'C:\Users\carte\Desktop\Queue\Queue\node_modules.amdefine.DELETE'
1326 error enoent This is related to npm not being able to find a file.
1327 verbose exit [ -4058, true ]
I know this is old, but I had currently this problem and couldn't find answers, so I post my solution, in case it helps someone else.
My problem was that I have npm install on C:\ and my project (or git folder) in G:\.
Moving my folder from G:\ to C:\Desktop and running npm install solved it for me.
I am not sure if it was because of moving it to C:\ or if it was because of moving it outside git-folder.
Edit: before that I actually cleaned npm cached using --force.
I'm using npm v6.7.0 and node v10.15.1
which npm version you are using, basically thses errors come with npm version below 5.5. For CLI
supporting information:
npm -v prints: 5.6.0
node -v prints: 8.9.1
npm config get registry prints: https://registry.npmjs.org/
Windows, OS X/macOS, or Linux?: Windows 10
In my case, npm install got stuck because I had TypeScript watching file in this directory. So the solution is to stop any tool that might be watching files and try again to install.
i have some deployment issues with deployment of my firebase functions, I can see that is a problem with npm, i have tried with 5 different versions of npm while running as admin but it still doesn't work, anyone got an idea og what is wrong? i have added the cmd print and the npm log
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli '--prefix',
1 verbose cli '$RESOURCE_DIR',
1 verbose cli 'run',
1 verbose cli 'lint' ]
2 info using npm#5.6.0
3 info using node#v8.9.4
4 verbose stack Error: ENOENT: no such file or directory, open
'C:\Users\nstavsholm\Desktop\NIKLAS\Praktik\bitcoin-info-action-
master\$RESOURCE_DIR\package.json'
5 verbose cwd C:\Users\nstavsholm\Desktop\NIKLAS\Praktik\bitcoin-info-action-
master
6 verbose Windows_NT 6.3.9600
7 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "--prefix" "$RESOURCE_DIR" "run" "lint"
8 verbose node v8.9.4
9 verbose npm v5.6.0
10 error path C:\Users\nstavsholm\Desktop\NIKLAS\Praktik\bitcoin-info-action-master\$RESOURCE_DIR\package.json
11 error code ENOENT
12 error errno -4058
13 error syscall open
14 error enoent ENOENT: no such file or directory, open 'C:\Users\nstavsholm\Desktop\NIKLAS\Praktik\bitcoin-info-action-master\$RESOURCE_DIR\package.json'
15 error enoent This is related to npm not being able to find a file.
16 verbose exit [ -4058, true ]
1. Try to replace $RESOURCE_DIR with %RESOURCE_DIR% in your firebase.json file.
or
2. (This one should solve the issue without workaround)
npm install -g git://github.com/firebase/firebase-tools#master
please try this installation again in ur project folder it should solve the issue.
Ridham Tarpara's comment under the question saved me.
I had kept trying to npm install a package to the project at the folder level.
But the package.json files are in the functions folder on firebase functions projects...
...so you have to cd into the functions folder and then install.
This solved my errors!
i have an issue with nodejs. I'm trying to install ember.js library through the command line. When i launch "npm install" command this log appear:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'install' ]
2 info using npm#2.11.3
3 info using node#v0.12.7
4 verbose config Skipping project config: C:\Users\Antonio/.npmrc. (matches userconfig)
5 verbose readDependencies loading dependencies from C:\Users\Antonio\package.json
6 error install Couldn't read dependencies
7 verbose stack Error: ENOENT, open 'C:\Users\Antonio\package.json'
7 verbose stack at Error (native)
8 verbose cwd C:\Users\Antonio
9 error Windows_NT 6.3.9600
10 error argv "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
11 error node v0.12.7
12 error npm v2.11.3
13 error path C:\Users\Antonio\package.json
14 error code ENOPACKAGEJSON
15 error errno -4058
16 error package.json ENOENT, open 'C:\Users\Antonio\package.json'
16 error package.json This is most likely not a problem with npm itself.
16 error package.json npm can't find a package.json file in your current directory.
17 verbose exit [ -4058, true ]
I've visited NPM Troubleshooting but i can't found the solution (i tried the three options but nothing happen).
Just to say: there is yet a folder named "npm" in AppData/Roaming.
The correct way to install ember is:
npm install -g ember-cli
ember new my-app
npm install by itself only works if you have a package.json in the directory where you type it.
I had this same issue trying to install some node modules to a fresh installation of Sails. I found the solution in this link: https://github.com/npm/npm/issues/9676
Just removed node_modules from my root and then npm install again, then I was able to install other modules as well.
Tried running Grunt build and Grunt watch on my project yesterday and I ran into the follow error:
Fatal Error: Unable to find local grunt.
I made sure the files weren't deleted. I tried reinstalling Node and Grunt. Files are there and reinstalling didn't work. I've included the debug file for reference. Does anyone know what the issue could be?
0 info it worked if it ends with ok
1 verbose cli [ 'E:\\Program Files\\nodejs\\\\node.exe',
1 verbose cli 'E:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install' ]
2 info using npm#1.3.24
3 info using node#v0.10.25
4 verbose node symlink E:\Program Files\nodejs\\node.exe
5 error install Couldn't read dependencies
6 error package.json ENOENT, open 'D:\sites\alleywire\package.json'
6 error package.json This is most likely not a problem with npm itself.
6 error package.json npm can't find a package.json file in your current directory.
7 error System Windows_NT 6.1.7601
8 error command "E:\\Program Files\\nodejs\\\\node.exe" "E:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
9 error cwd D:\sites\alleywire
10 error node -v v0.10.25
11 error npm -v 1.3.24
12 error path D:\sites\alleywire\package.json
13 error code ENOPACKAGEJSON
14 error errno 34
15 verbose exit [ 34, true ]
You need to install grunt locally with your project (install without -g). This is not the same as grunt-cli which is the grunt command on your command line.
Run npm install inside your project folder if you have a package.json file there.
So my problem is this. I have a project with a package.json. When I in the command prompt (cmd.exe) run "npm install" everything installs as expected. However when I do the exact same thing in PowerShell (powershell.exe) I get an error: "npm ERR! Error: ENOENT, open 'c:\package.json'" even though I ran "npm install" in the path of the project. It always searches for package.json in c: for some reason I can't understand.
Below is the npm-debug.log (which also is written i c: even though my path is c:\code\myProject):
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install' ]
2 info using npm#1.3.11
3 info using node#v0.10.21
4 verbose node symlink C:\Program Files\nodejs\\node.exe
5 error install Couldn't read dependencies
6 error Error: ENOENT, open 'c:\package.json'
7 error If you need help, you may report this log at:
7 error <http://github.com/isaacs/npm/issues>
7 error or email it to:
7 error <npm-#googlegroups.com>
8 error System Windows_NT 6.2.9200
9 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
10 error cwd c:\
11 error node -v v0.10.21
12 error npm -v 1.3.11
13 error path c:\package.json
14 error code ENOENT
15 error errno 34
16 verbose exit [ 34, true ]
I can't find a solution to this problem anywhere. The PATH variable is setup correctly since both node and npm itself works.
For me, it was much easier to do this in Powershell.
$env:Path += ";C:\Program Files\nodejs\"
Ran "npm" in powershell, and came up straight away.
Use .npmrc to set the prefix explicitly:
Go to \Users\%USERNAME%\.npmrc. For example, in Powershell:
Notepad "\Users\$env:USERNAME\.npmrc"
Set the prefix:
prefix = "C:/Program Files/nodejs"
References
Is there a manual install of node.js for Windows 7?
Opening a program with PowerShell from a shortcut
nodeJS Modules: Loading from the Global Folders
npm config Readme
npm Folders: prefix configuration
nodejs source: legacy-npm-self-install.js
forward slash usage