I try to get into the tutorial of React Native but I am stuck at init a new project. A npm error occurs npm ERR! enoent ENOENT: no such file or directory, open '/Users/vikti/dev/AwesomeProject/node_modules/.staging/xtend-ea557a9c3da42553dd204c5fe8fb762c/package.json'
Here is the log:
MacBook-Pro-de-vikti:dev vikti$ react-native init AwesomeProject
This will walk you through creating a new React Native project in /Users/vikti/dev/AwesomeProject
AwesomeProject#0.0.1 /Users/vikti/dev/AwesomeProject
├── absolute-path#0.0.0 extraneous
├── archive-type#3.0.1 extraneous
├── babel-core#5.8.21 extraneous
├── beeper#1.1.0 extraneous
├── bl#1.0.0 extraneous
├── bser#1.0.0 extraneous
├── buffer-to-vinyl#1.0.1 extraneous
├── caw#1.1.0 extraneous
├── chokidar#1.2.0 extraneous
├── cli-table#0.3.1 extraneous
├── commondir#1.0.1 extraneous
├── connect#2.8.3 extraneous
├── cross-spawn#2.0.0 extraneous
├── dargs#4.0.1 extraneous
├── dateformat#1.0.11 extraneous
├── detect-conflict#1.0.0 extraneous
├── diff#1.4.0 extraneous
├── each-async#1.1.1 extraneous
├── ejs#2.3.4 extraneous
├── errno#0.1.4 extraneous
├── filenamify#1.2.0 extraneous
├── findup-sync#0.2.1 extraneous
├── github-username#2.0.0 extraneous
├── glob-watcher#0.0.8 extraneous
├── glob2base#0.0.12 extraneous
├── globby#2.1.0 extraneous
├── got#4.2.0 extraneous
├── grouped-queue#0.3.0 extraneous
├── gruntfile-editor#1.0.0 extraneous
├── gulp-rename#1.2.2 extraneous
├── html-wiring#1.2.0 extraneous
├── image-size#0.3.5 extraneous
├── immutable#3.7.5 extraneous
├── inquirer#0.8.5 extraneous
├── is-bzip2#1.0.0 extraneous
├── is-gzip#1.0.0 extraneous
├── is-tar#1.0.0 extraneous
├── is-url#1.2.1 extraneous
├── is-zip#1.0.0 extraneous
├── istextorbinary#1.0.2 extraneous
├── joi#5.1.0 extraneous
├── lodash._reescape#3.0.0 extraneous
├── lodash._reevaluate#3.0.0 extraneous
├── lodash.template#3.6.2 extraneous
├── log-symbols#1.0.2 extraneous
├── module-deps#3.5.6 extraneous
├── multimatch#2.0.0 extraneous
├── multipipe#0.1.2 extraneous
├── nopt#3.0.4 extraneous
├── optimist#0.6.1 extraneous
├── ordered-read-streams#0.1.0 extraneous
├── pretty-bytes#2.0.1 extraneous
├── progress#1.1.8 extraneous
├── promise#7.0.4 extraneous
├── react-timer-mixin#0.13.3 extraneous
├── react-tools#0.14.0-beta1 extraneous (git://github.com/facebook/react.git#b4e74e38e43ac53af8acd62c78c9213be0194245)
├── rebound#0.0.12 extraneous
├── regenerator#0.8.36 extraneous
├── rimraf#2.4.3 extraneous
├── run-async#0.1.0 extraneous
├── sane#1.3.0 extraneous
├── seek-bzip#1.0.5 extraneous
├── shelljs#0.5.3 extraneous
├── sinon#1.17.1 extraneous
├── stacktrace-parser#0.1.3 extraneous
├── stat-mode#0.2.1 extraneous
├── strip-dirs#1.1.1 extraneous
├── text-table#0.2.0 extraneous
├── uglify-js#2.4.16 extraneous
├── underscore#1.7.0 extraneous
├── underscore.string#3.2.2 extraneous
├── untildify#2.1.0 extraneous
├── vinyl#0.4.6 extraneous
├── vinyl-assign#1.2.1 extraneous
├── vinyl-file#1.2.1 extraneous
├── ware#1.3.0 extraneous
├── wordwrap#1.0.0 extraneous
├── ws#0.8.0 extraneous
├── xdg-basedir#2.0.0 extraneous
├── yauzl#2.3.1 extraneous
├── yeoman-assert#2.1.0 extraneous
└── yeoman-welcome#1.0.1 extraneous
npm ERR! Darwin 14.4.0
npm ERR! argv "/Users/vikti/.nvm/versions/node/v4.1.1/bin/node" "/Users/vikti/.nvm/versions/node/v4.1.1/bin/npm" "install" "--save" "react-native"
npm ERR! node v4.1.1
npm ERR! npm v3.3.5
npm ERR! path /Users/vikti/dev/AwesomeProject/node_modules/.staging/xtend-ea557a9c3da42553dd204c5fe8fb762c/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/Users/vikti/dev/AwesomeProject/node_modules/.staging/xtend-ea557a9c3da42553dd204c5fe8fb762c/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /Users/vikti/dev/AwesomeProject/npm-debug.log
Any idea on what is wrong?
Related
I have two packages inside my npm workspace api & cdk. I would like to create an individual package-lock.json inside api & cdk as both of those projects will get deployed individually. Is this currently possible with npm workspaces? What are other alternatives or strategies?
├── api
│ ├── package.json
├── cdk
│ ├── package.json
├── node_modules
├── package.json
├── package-lock.json
Is it possible to self host elm packages like gems or nuggets?
The team already agreed to use it, but with our proxy we cant install packages.
thank you for the support
What you can do is to clone the library your are looking for in the elm package manager cache.
However, I don't know how you will be able to manage to create the version.dat file.
Maybe copy it from another computer?
~/.elm$ tree -L 5
.
└── 0.19.0
└── package
├── ContaSystemer
│ └── elm-menu
│ └── 1.0.2
├── elm
│ ├── browser
│ │ └── 1.0.1
│ ├── bytes
│ │ └── 1.0.7
│ ├── core
│ │ └── 1.0.2
│ ├── file
│ │ └── 1.0.1
│ ├── html
│ │ └── 1.0.0
│ ├── http
│ │ └── 2.0.0
│ ├── json
│ │ └── 1.1.2
│ ├── parser
│ │ └── 1.1.0
│ ├── random
│ │ └── 1.0.0
│ ├── regex
│ │ └── 1.0.0
│ ├── time
│ │ └── 1.0.0
│ ├── url
│ │ └── 1.0.0
│ └── virtual-dom
│ └── 1.0.0
├── elm-community
│ ├── list-extra
│ │ └── 8.1.0
│ └── string-extra
│ └── 4.0.0
├── elm-explorations
│ └── test
│ └── 1.0.0
├── goilluminate
│ └── elm-fancy-daterangepicker
│ └── 4.0.0
├── justinmimbs
│ └── date
│ └── 3.1.2
├── NoRedInk
│ └── elm-json-decode-pipeline
│ └── 1.0.0
├── rtfeldman
│ ├── elm-hex
│ │ └── 1.0.0
│ └── elm-iso8601-date-strings
│ └── 1.1.2
├── Skinney
│ └── murmur3
│ └── 2.0.7
├── terezka
│ └── yaml
│ └── 1.0.0
├── truqu
│ └── elm-base64
│ └── 2.0.4
└── versions.dat
I tried to npm uninstall -g is not working.
First I had tried npm ls -g --depth=0 it produced the following results
/usr/local/lib
├── UNMET PEER DEPENDENCY #babel/core#7.0.0-beta.4
├── #babel/node#7.0.0-beta.44
├── aws-cli#0.0.2
├── babel-core#6.26.0
├── babel-loader#7.1.4
├── babel-plugin-transform-decorators-legacy#1.3.4
├── babel-plugin-transform-object-rest-spread#6.26.0
├── babel-plugin-transform-optional-chaining#7.0.0-beta.3
├── babel-preset-react#6.24.1
├── babel-preset-stage-3#6.24.1
├── babel-register#7.0.0-beta.3
├── coffeescript#2.2.4
├── graceful-fs#4.1.11
├── minimatch#3.0.4
├── n#2.1.8
├── npm#5.8.0
├── ntdl#1.0.2
├── pdf-compress#1.0.0 -> /home/ubuntu/workarea/sourcecode/pdf-optimise
├── virtualenv#0.3.1
├── UNMET PEER DEPENDENCY webpack#2 || 3 || 4
└── yarn#1.5.1
npm ERR! peer dep missing: #babel/core#7.0.0-beta.44, required by
#babel/node#7.0.0-beta.44
npm ERR! peer dep missing: webpack#2 || 3 || 4, required by babel-
loader#7.1.4
npm ERR! peer dep missing: #babel/core#7.0.0-beta.44, required by
#babel/register#7.0.0-beta.44
npm ERR! peer dep missing: webpack#>=0.9 <2 || ^2.1.0-beta || ^2.2.0,
required by worker-loader#0.8.1
}
Then I had tried uninstalling it didn't succeeded
root#ip-10-252-14-11:/home/ubuntu/workarea/sourcecode/ntdl# sudo npm
uninstall -g #babel/node#7.0.0-beta.44
up to date in 0.063s
root#ip-10-252-14-11:/home/ubuntu/workarea/sourcecode/ntdl# babel-node --
version
7.0.0-beta.44
Then I tried
root#ip-10-252-14-11:/home/ubuntu/workarea/sourcecode/ntdl# npm uninstall
-g *
npm ERR! code ENOLOCAL
npm ERR! Could not install from
"../../home/ubuntu/workarea/sourcecode/ntdl" as it does not contain a
package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-04-10T01_33_46_993Z-debug.log
Please help me in resolving this issue.
With Many Thanks,
Bharath AK
Did you try this? npm uninstall npm -g
see here
I install gulp using npm install -g gulp
[npm WARN deprecation warnings redacted]
/usr/local/bin/gulp -> /usr/local/lib/node_modules/gulp/bin/gulp.js
/usr/local/lib
└── gulp#3.9.1
When I try to run the gulp command I get:
gulp
[19:42:23] Local gulp not found in ~/javascript
[19:42:23] Try running: npm install gulp
But when I install another npm package globally, it works. For instance when I install create-react-app like so:
npm install -g create-react-app
/usr/local/bin/create-react-app -> /usr/local/lib/node_modules/create-react-app/index.js
/usr/local/lib
└─┬ create-react-app#0.2.0
├─┬ chalk#1.1.3
│ ├── ansi-styles#2.2.1
│ ├── escape-string-regexp#1.0.5
│ ├─┬ has-ansi#2.0.0
│ │ └── ansi-regex#2.0.0
│ ├── strip-ansi#3.0.1
│ └── supports-color#2.0.0
├─┬ cross-spawn#4.0.0
│ ├─┬ lru-cache#4.0.1
│ │ ├── pseudomap#1.0.2
│ │ └── yallist#2.0.0
│ └─┬ which#1.2.10
│ └── isexe#1.1.2
├── minimist#1.2.0
└── semver#5.3.0
When I run the command after installation it works:
create-react-app
Usage: create-react-app <project-directory> [--verbose]
Is there any reason why gulp would screw out?
You have to install the Gulp CLI to get the command line to work npm install -g gulp-cli
I used npm install --dev to install the dependencies listed in a package.json file and it seems that rather than installing all the packages in a flat structure, it is installing the dependencies of each module inside the module's directory.
I had to cancel it because it was taking a lot, because many dependencies should have been already satisfied but it had to re-download them in a different nested directory (and I hope that there are not loops and it would have eventually finished)...
Using the tree command this is an example of what I am getting:
├── grunt-cli
│ └── node_modules
│ ├── findup-sync
│ │ └── node_modules
│ │ ├── glob
│ │ │ └── node_modules
│ │ │ ├── minimatch
│ │ │ │ └── node_modules
│ │ │ │ ├── lru-cache
│ │ │ │ │ └── node_modules
│ │ │ │ │ └── weak
│ │ │ │ │ └── node_modules
│ │ │ │ │ └── mocha
│ │ │ │ │ └── node_modules
│ │ │ │ │ ├── coffee-script
│ │ │ │ │ │ └── node_modules
│ │ │ │ │ │ └── jison
│ │ │ │ │ │ └── node_modules
│ │ │ │ │ │ └── browserify
│ │ │ │ │ │ └── node_modules
│ │ │ │ │ │ ├── browser-resolve
│ │ │ │ │ │ │ └── example
Any ideas why this might be happening?
Don't worry, that's actually the way Npm was designed. You may even see the same module installed many times (though typically with different versions).
The idea is that each module installed under node_modules is a somewhat self-contained installation of that module with its dependencies and the necessary versions -- it doesn't depend on modules installed globally.
If you are worried about inefficiency of modules being installed multiple times, the experimental npm dedupe.
dedupe is helpful, as Jonathan Warden says. However, try npm3. For a simple package such as gulp-jscs the install of npm3 was 20% fewer files, 5% less disk space. And tree depth went from 22 to 5. However npm3 was 2x slower for me.