currently I am using ResizableRect imported from this module mockingbot/react-resizable-rotatable-draggable. But it is unable to resize or drag the ResizableRect on the mobile browser and touching event is not available.
Then, I found this module rinose/react-resizable-rotatable-draggable, which has the touching event. However, there is no clear instruction on how to install the rinose's module as the content in README.md in rinose's module is exactly the same as that in mockingbot's module.
May I know how to import rinose's module into my project without using npm? Thanks!
UPDATE
I tried 'npm install git+https://github.com/rinose/react-resizable-rotatable-draggable.git' suggested by Antoine Raoul Iscaros but it still doesn't work. It stated that 'rollup-plugin-babel' module is not found though I had installed the module(which is already deprecated). Below are the error logs
react-resizable-rotatable-draggable-touch#0.3.0-dev.0 prepack C:\Users\Forge-15\AppData\Roaming\npm-cache\_cacache\tmp\git-clone-1a6e54a2
> npm run build
> react-resizable-rotatable-draggable-touch#0.3.0-dev.0 build C:\Users\Forge-15\AppData\Roaming\npm-cache\_cacache\tmp\git-clone-1a6e54a2
> rollup -c
[!] Error: Cannot find module 'rollup-plugin-babel'
Require stack:
- C:\Users\Forge-15\AppData\Roaming\npm-cache\_cacache\tmp\git-clone-1a6e54a2\rollup.config.js
- C:\Users\Forge-15\AppData\Roaming\npm\node_modules\rollup\dist\shared\loadConfigFile.js
- C:\Users\Forge-15\AppData\Roaming\npm\node_modules\rollup\dist\bin\rollup
Error: Cannot find module 'rollup-plugin-babel'
Require stack:
- C:\Users\Forge-15\AppData\Roaming\npm-cache\_cacache\tmp\git-clone-1a6e54a2\rollup.config.js
- C:\Users\Forge-15\AppData\Roaming\npm\node_modules\rollup\dist\shared\loadConfigFile.js
- C:\Users\Forge-15\AppData\Roaming\npm\node_modules\rollup\dist\bin\rollup
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
at Function.Module._load (internal/modules/cjs/loader.js:842:27)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (C:\Users\Forge-15\AppData\Roaming\npm-cache\_cacache\tmp\git-clone-1a6e54a2\rollup.config.js:5:13)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.require.extensions.<computed> [as .js] (C:\Users\Forge-15\AppData\Roaming\npm\node_modules\rollup\dist\shared\loadConfigFile.js:508:20)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-resizable-rotatable-draggable-touch#0.3.0-dev.0 build: `rollup -c`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-resizable-rotatable-draggable-touch#0.3.0-dev.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Forge-15\AppData\Roaming\npm-cache\_logs\2020-08-28T04_25_05_798Z-debug.log
npm ERR! premature close
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Forge-15\AppData\Roaming\npm-cache\_logs\2020-08-28T04_25_05_840Z-debug.log
you can install directly from git using
npm install git+https://github.com/rinose/react-resizable-rotatable-draggable.git
Question is already answered here How to install an npm package from GitHub directly?
Related
I have a NodeJS project that is using danfojs-node and #tensorflow/tfjs-node on node version 14.20.1.
The project is able to run successfully on Mac OS, but when I try to deploy to a development environment in Cloud Foundry, it bombs out with the following error:
* Building TensorFlow Node.js bindings
OUT node-pre-gyp install failed with error: Error: Command failed: node-pre-gyp install --fallback-to-build
OUT npm ERR! /home/vcap/.npm/_logs/2023-01-16T19_49_09_545Z-debug.log
OUT internal/modules/cjs/loader.js:905
OUT throw err;
OUT ^
OUT Error: Cannot find module '../lib/main'
OUT Require stack:
OUT - /tmp/app/node_modules/#tensorflow/tfjs-node/node_modules/.bin/node-pre-gyp
OUT at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
OUT at Function.Module._load (internal/modules/cjs/loader.js:746:27)
OUT at Module.require (internal/modules/cjs/loader.js:974:19)
OUT at require (internal/modules/cjs/helpers.js:101:18)
OUT at Object.<anonymous> (/tmp/app/node_modules/#tensorflow/tfjs-node/node_modules/.bin/node-pre-gyp:4:1)
OUT at Module._compile (internal/modules/cjs/loader.js:1085:14)
OUT at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
OUT at Module.load (internal/modules/cjs/loader.js:950:32)
OUT at Function.Module._load (internal/modules/cjs/loader.js:790:12)
OUT at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12) {
OUT code: 'MODULE_NOT_FOUND',
OUT requireStack: [
OUT '/tmp/app/node_modules/#tensorflow/tfjs-node/node_modules/.bin/node-pre-gyp'
OUT ]
OUT }
OUT npm ERR! code ELIFECYCLE
OUT npm ERR! errno 1
OUT npm ERR! #tensorflow/tfjs-node#3.13.0 install: `node scripts/install.js`
OUT npm ERR! Exit status 1
OUT npm ERR!
OUT npm ERR! Failed at the #tensorflow/tfjs-node#3.13.0 install script.
OUT npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
OUT npm ERR! A complete log of this run can be found in:
OUT **ERROR** Unable to build dependencies: exit status 1
OUT **WARNING** A module may be missing from 'dependencies' in package.json
OUT This module may be specified in 'devDependencies' instead of 'dependencies'
OUT See: https://devcenter.heroku.com/articles/nodejs-support#devdependencies
ERR Failed to compile droplet: Failed to run all supply scripts: exit status 14
OUT Exit status 223
We've tried every conceivable combination of node & tensorflowjs/tfjs-node versions, and we've also tried adding #mapbox/node-pre-gyp to the dependencies in package.json. This current iteration is using tfjs-node#3.13.0.
This particular iteration had #tensorflow/tfjs-node in devDependencies as well, but we're receiving this error regardless of whether or not we include the package there.
We've also tried adding tensorflow/tfjs-node preinstall scripts w/ the --ignore-scripts flag and post-install scripts with the --build-addon-from-source flag in package.json, but to no avail.
Again, everything works great locally (famous last words) with a simple npm install.
Apologies if there's not enough info here -- I'm very green at this -- but this has been weeks of failure and would really appreciate any help!
When i start my react project all seems good, but when i try to build this, it doesn't work, i have this error :
node:internal/fs/utils:344
throw err;
^
Error: UNKNOWN: unknown error, lstat 'C:\Users\darkx\Bureau\mlvojobs\mlvojobs\node_modules\fs-extra\lib\util'
at Object.realpathSync (node:fs:2490:7)
at toRealPath (node:internal/modules/cjs/loader:394:13)
at tryFile (node:internal/modules/cjs/loader:390:10)
at tryExtensions (node:internal/modules/cjs/loader:402:22)
at Function.Module._findPath (node:internal/modules/cjs/loader:558:20)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:\Users\darkx\Bureau\mlvojobs\mlvojobs\node_modules\fs-extra\lib\copy\copy.js:7:22) {
errno: -4094,
syscall: 'lstat',
code: 'UNKNOWN',
path: 'C:\\Users\\darkx\\Bureau\\mlvojobs\\mlvojobs\\node_modules\\fs-extra\\lib\\util'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mlvojobs#0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mlvojobs#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\darkx\AppData\Roaming\npm-cache\_logs\2022-08-18T22_53_48_493Z-debug.log
PS C:\Users\darkx\Bureau\mlvojobs\mlvojobs> npm install fs-extra
npm ERR! cb.apply is not a function
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\darkx\AppData\Roaming\npm-cache\_logs\2022-08-18T22_54_15_541Z-debug.log
And when i try to install something with npm it says :
npm ERR! cb.apply is not a function
Node.js sometimes works weird. I encountered this error, my option is switch to another Node.js version.
I recommend using nvm-windows (seem like you're using Windows)
You can install latest Node.js version lts
nvm install lts
Or specific version, for example:
nvm install 16.16.0
Then delete your project node_modules and run:
npm install
Finally, build your project again. Let me know if it work!
Possible solution :
Go to : C:\Users(your username)\AppData\Roaming
Delete the npm folder and if there is one npm cache folder.
Run npm cache clean —force
it should work
Getting the following error when I run npm start in my newly created react app that I created using npx create-react-app my-app. I tried uninstalling create react app globally and then updating my node.js version to the latest available but still getting this error. Any advice on how to fix this?
I'm on mac os
Thanks
internal/modules/cjs/loader.js:614
throw e;
^
Error: No valid exports main found for '/Users/quinnbarnett/Desktop/ugh/ugh/node_modules/postcss-safe-parser/node_modules/postcss'
at resolveExportsTarget (internal/modules/cjs/loader.js:611:9)
at applyExports (internal/modules/cjs/loader.js:492:14)
at resolveExports (internal/modules/cjs/loader.js:541:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:643:22)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:941:27)
at Function.Module._load (internal/modules/cjs/loader.js:847:27)
at Module.require (internal/modules/cjs/loader.js:1016:19)
at require (internal/modules/cjs/helpers.js:69:18)
at Object.<anonymous> (/Users/quinnbarnett/Desktop/ugh/ugh/node_modules/postcss-safe-parser/lib/safe-parse.js:1:17)
at Module._compile (internal/modules/cjs/loader.js:1121:30) {
code: 'MODULE_NOT_FOUND'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ugh#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ugh#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above. ```
Try update to min v14.5 for your node.
Try installing autoprefixer#9.8.0 with npm i autoprefixer#9.8.0
It looks like a bug in node.js and there's an issue open for it.
https://github.com/facebook/create-react-app/issues/9273
I got this error when I do npm run dev , and I have installed the latest react/react-dom globally in my pc and locally in this project.
What can be done to fix this issue?
macbookpro#MacBookProdeMacBook-Pro 01.webpack-base % npm run dev
> 01.webpack-base#1.0.0 dev /Users/macbookpro/Desktop/01.webpack-base
> webpack-dev-server --open
internal/modules/cjs/loader.js:985
throw err;
^
Error: Cannot find module 'webpack/lib/node/NodeTemplatePlugin'
Require stack:
- /Users/macbookpro/node_modules/_html-webpack-plugin#4.3.0#html-webpack-plugin/lib/child-compiler.js
- /Users/macbookpro/node_modules/_html-webpack-plugin#4.3.0#html-webpack-plugin/lib/cached-child-compiler.js
- /Users/macbookpro/node_modules/_html-webpack-plugin#4.3.0#html-webpack-plugin/index.js
- /Users/macbookpro/Desktop/01.webpack-base/webpack.config.js
- /usr/local/lib/node_modules/webpack-cli/bin/utils/convert-argv.js
- /usr/local/lib/node_modules/webpack-dev-server/bin/webpack-dev-server.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
at Function.Module._load (internal/modules/cjs/loader.js:864:27)
at Module.require (internal/modules/cjs/loader.js:1044:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (/Users/macbookpro/node_modules/_html-webpack-plugin#4.3.0#html-webpack-plugin/lib/child-compiler.js:14:28)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Module.require (internal/modules/cjs/loader.js:1044:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/macbookpro/node_modules/_html-webpack-plugin#4.3.0#html-webpack-plugin/lib/child-compiler.js',
'/Users/macbookpro/node_modules/_html-webpack-plugin#4.3.0#html-webpack-plugin/lib/cached-child-compiler.js',
'/Users/macbookpro/node_modules/_html-webpack-plugin#4.3.0#html-webpack-plugin/index.js',
'/Users/macbookpro/Desktop/01.webpack-base/webpack.config.js',
'/usr/local/lib/node_modules/webpack-cli/bin/utils/convert-argv.js',
'/usr/local/lib/node_modules/webpack-dev-server/bin/webpack-dev-server.js'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! 01.webpack-base#1.0.0 dev: `webpack-dev-server --open`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the 01.webpack-base#1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/macbookpro/.npm/_logs/2020-05-27T09_15_12_766Z-debug.log
I had a similar issue this bellow helped me to fix that
rm -rf node_modules
rm package-lock.json
npm cache verify
npm install
If it does not work maybe try this taken from Raunaqss's answer :
Webpack 4 onwards you are required to install webpack-cli. You may also want to install webpack-dev-middleware if you need to use the options marked with a key on this page.
In this case the command to install is:
npm install --save-dev webpack webpack-cli html-webpack-plugin webpack-dev-server webpack-dev-middleware
As mentioned above, webpack-dev-middleware should be optionally added based on your requirements.
I am getting errors when trying to deploy Node.js app to Google App Engine. Node.js run time get crashed with require statement. What am I wrong?
Directory structure:
|--app
---protocol.js
app.js .....
In file app.js
.....
var protocol = require('./app/protocol');
....
When deploying with gcloud:
gcloud app deploy app.yaml
then errors:
> nodejs-getting-started#1.0.0 start /app
> node app.js
module.js:471
throw err;
^
Error: Cannot find module './app/protocol'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/app/app.js:21:16)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/nodejs/bin/node" "/nodejs/bin/npm" "start"
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! nodejs-getting-started#1.0.0 start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodejs-getting-started#1.0.0 start script 'node app.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the nodejs-getting-started package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node app.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs nodejs-getting-started
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls nodejs-getting-started
npm ERR! There is likely additional logging output above.
The error was reported to the google SDK issue reporting,
https://code.google.com/p/google-cloud-sdk/issues/detail?id=1431
It was solved by downgrading to 137.0.1
gcloud components update --version=137.0.1
and redoing the process.
I was having a similar issue trying to deploy a Sails.js project. Downgrading gcloud from 138.0.0 to 137.0.1 also fixed my issue.