I'm getting following error when I'm trying to serve the ionic project.
Error: Cannot find module '/Users/SampathM/thotilla/node_modules/#ionic/app-scripts'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/lib/node_modules/ionic/node_modules/#ionic/cli-utils/lib/ionic-angular/app-scripts.js:9:16)
at Generator.next (<anonymous>)
at /usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js:107:75
at new Promise (<anonymous>)
at Object.__awaiter (/usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js:103:16)
at Object.importAppScripts (/usr/local/lib/node_modules/ionic/node_modules/#ionic/cli-utils/lib/ionic-angular/app-scripts.js:7:20)
how to resolve this?
I have had the same problem and I fix it executing :
npm i -g #ionic/app-scripts
after giving root permissions with sudo su
Hope to be helpful
Related
I was having a lot of trouble with elasticsearch partially because the hard drive on my laptop is filling up I tried making space but I asked myself if maybe there was an elasticsearch lite for development environment only and then I found npm elasticsearch-lite I followed the instructions, installed it, when I run: PORT=9200 ~/node_modules/.bin/elasticsearch I get the following error, even after success running npm install wasi:
$ PORT=9200 ~/node_modules/.bin/elasticsearch
internal/modules/cjs/loader.js:892
throw err;
^
Error: Cannot find module 'wasi'
Require stack:
- /home/fugee/node_modules/elasticsearch-lite/lib.elasticsearch.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at /home/fugee/node_modules/elasticsearch-lite/lib.elasticsearch.js:52:34
at Array.forEach (<anonymous>)
at /home/fugee/node_modules/elasticsearch-lite/lib.elasticsearch.js:50:53
at /home/fugee/node_modules/elasticsearch-lite/lib.elasticsearch.js:59:6
at Object.<anonymous> (/home/fugee/node_modules/elasticsearch-lite/lib.elasticsearch.js:360:2)
at Module._compile (internal/modules/cjs/loader.js:1072:14) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/fugee/node_modules/elasticsearch-lite/lib.elasticsearch.js'
]
}
I was trying to follow this tutorial
This is a tutorial on Solana program dev using anchor and the error rises from using yarn on ubuntu 20.0 i guess
and I got this long error I can't understand
All the help is appreciated
yarn run v1.22.17
warning package.json: No license field
$ /home/sadaf/code/solana-twitter/node_modules/.bin/ts-mocha -p ./tsconfig.json -t 1000000 'tests/**/*.ts'
ReferenceError: TextEncoder is not defined
at Function.fromSecretKey (/home/sadaf/code/solana-twitter/node_modules/#solana/web3.js/src/keypair.ts:66:23)
at Function.local (/home/sadaf/code/solana-twitter/node_modules/#project-serum/anchor/src/nodewallet.ts:13:27)
at Function.env (/home/sadaf/code/solana-twitter/node_modules/#project-serum/anchor/src/provider.ts:79:31)
at Suite.describe (/home/sadaf/code/solana-twitter/tests/solana-twitter.ts:7:38)
at Object.create (/home/sadaf/code/solana-twitter/node_modules/mocha/lib/interfaces/common.js:148:19)
at context.describe.context.context (/home/sadaf/code/solana-twitter/node_modules/mocha/lib/interfaces/bdd.js:42:27)
at Object.<anonymous> (/home/sadaf/code/solana-twitter/tests/solana-twitter.ts:5:1)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Module.m._compile (/home/sadaf/code/solana-twitter/node_modules/ts-node/src/index.ts:439:23)
at Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Object.require.extensions.(anonymous function) [as .ts] (/home/sadaf/code/solana-twitter/node_modules/ts-node/src/index.ts:442:12)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.implementationOfRequireOrImportForUnstableEsm [as requireOrImport] (/home/sadaf/code/solana-twitter/node_modules/mocha/lib/nodejs/esm-utils.js:116:12)
at Object.exports.loadFilesAsync (/home/sadaf/code/solana-twitter/node_modules/mocha/lib/nodejs/esm-utils.js:103:34)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Updating Node to the latest version solved it for me.
I am trying to install this Github Repo using the Docker image. I am following these instructions and I am getting this error:
Error: ENOENT: no such file or directory, stat '/app/data/ca.srl'
at Object.statSync (fs.js:1127:3)
at internal/fs/utils.js:709:32
at hidden (internal/errors.js:294:14)
at Object.rmSync (fs.js:931:13)
at new <anonymous> (/app/server/index.js:1:71639)
at /app/server/index.js:1:69383
at Object.<anonymous> (/app/server/index.js:1:73817)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:933:32)
at Function.Module._load (internal/modules/cjs/loader.js:774:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
errno: -2,
syscall: 'stat',
code: 'ENOENT',
path: '/app/data/ca.srl'
}
However, when I install this using the docker-compose file or the Github repo code, it works perfectly fine.
I am learning docker and trying to figure out why I get this error and how can I fix this.
I am using WSL2, Ubuntu 18.0 LTS on Windows 10.
Thanks in advance 👍
So, I'm setting up new React Native project, and I'm trying to setup XCode simulator. I've opened my React Native project in XCode and in the terminal when I run "yarn run ios" from a project folder I'm getting the error "Error: Cannot find module '#babel/runtime/helpers/interopRequireDefault'
at Function.Module._resolveFilename".
My-MacBook-Pro-2:projectZero alexs$ yarn run ios
yarn run v1.13.0
$ react-native run-ios
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module '#babel/runtime/helpers/interopRequireDefault'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/Users/alexs/Desktop/React/Native/projectZero/node_modules/react-native/local-cli/cliEntry.js:11:41)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Module._compile (/Users/alexs/Desktop/React/Native/projectZero/node_modules/pirates/lib/index.js:83:24)
at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Object.newLoader [as .js] (/Users/alexs/Desktop/React/Native/projectZero/node_modules/pirates/lib/index.js:88:7)
at Module.load (internal/modules/cjs/loader.js:599:32)
error Command failed with exit code 1.
Does anybody have an idea how to solve this?
I solved it by running:
yarn add #babel/runtime
I'm having a lot of trouble updating a cordova project from 3.3 to 4.x. The documentation says that after updating de CLI I should execute:
cordova platform update iOS
But I get this error:
Error: Cannot find module 'shelljs'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/Users/danielrvt/.cordova/lib/npm_cache/cordova-ios/3.7.0/package/bin/update:21:13)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
Error: /Users/danielrvt/.cordova/lib/npm_cache/cordova-ios/3.7.0/package/bin/update: Command failed with exit code 8
at ChildProcess.whenDone (/Users/danielrvt/.nvm/v0.10.33/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
Can you help me with this update?
I had the same issue. Found solution here: https://issues.apache.org/jira/browse/CB-8036
install shelljs
cd
cd .cordova/lib/npm_cache/cordova-ios/3.7.0/package/bin
npm install shelljs
cordova plaform update ios
That worked for me
I had a similar problem. Try running the command with admin permissions (sudo).
sudo phonegap platform update ios
Then enter your password.