I am on windows 10, using vscode. Basically finished the petshop tutorial with no issues or problems using truffle.
when I enter the command npm run dev it fails as shown below.
PS Y:\code\petshop> npm run dev
> pet-shop#1.0.0 dev
> lite-server
internal/modules/cjs/loader.js:316
throw err;
^
Error: Cannot find module 'Y:\code\petshop\node_modules\immutable\dist\immutable'. Please verify that the package.json has a valid "main" entry
at tryPackage (internal/modules/cjs/loader.js:308:19)
at Function.Module._findPath (internal/modules/cjs/loader.js:521:18)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:872:27)
at Function.Module._load (internal/modules/cjs/loader.js:730:27)
at Module.require (internal/modules/cjs/loader.js:957:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (Y:\code\petshop\node_modules\browser-sync\dist\hooks.js:3:17)
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) {
code: 'MODULE_NOT_FOUND',
path: 'Y:\\code\\petshop\\node_modules\\immutable\\package.json',
requestPath: 'immutable'
}
Not sure where to go from here, nothing works. This type of error is a bit beyond me. Any and all help is greatly appreciated.
EDIT: changed screenshot to code snippet. And I realized the problem is that the 'immutable' path is non-existent in my node_modules. Still not sure how to address this. tried a cheeky npm install immutable to no avail....
Related
I'm looking to create my own external adapter. I pulled the external adapter repo and set it up with yarn per the README. However, when I try running cd packages/sources/coingecko && yarn start within any of the adapter directories, I get the following error:
/Users/jvilla/Documents/GitHub/external-adapters-js/packages/core/bootstrap/dist/lib/cache/index.js:73
if (!context?.cache?.instance)
^
SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:1053:16)
at Module._compile (internal/modules/cjs/loader.js:1101:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.external_module_.Module._load (/Users/jvilla/Documents/GitHub/external-adapters-js/.pnp.cjs:42492:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/Users/jvilla/Documents/GitHub/external-adapters-js/packages/core/bootstrap/dist/index.js:6:17)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
The README mentions that some require environmental variables, but I don't see anything mentioned in coingecko and I'm not having any luck with the other adapters either.
Thanks to help in the Discord, I was able to resolve my issue. I was using an old version of node and needed to upgrade! The separate, but related, Chainlink Node Operator repo README has Node v12 hardcoded in its setup process, which won't work when running the External Adapter repo.
Error: Cannot find module '.'
Require stack:
- /codebuild/output/src309915592/src/node_modules/.bin/lerna
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:831:15)
at Function.Module._load (internal/modules/cjs/loader.js:687:27)
at Module.require (internal/modules/cjs/loader.js:903:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/codebuild/output/src309915592/src/node_modules/.bin/lerna:11:3)
at Module._compile (internal/modules/cjs/loader.js:1015:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
at Module.load (internal/modules/cjs/loader.js:879:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/codebuild/output/src309915592/src/node_modules/.bin/lerna' ]
}
I get this error on running the test command:
lerna run --stream test --parallel
Also, tried with
lerna run --stream test --parallel --scope tenant-registration-service
In the services, test script looks like,
"test": "serverless-bundle test --verbose --coverage",
I installed Lerna globally in the pipeline. How do I debug this? What module is it not able to find? It looks like it already has lerna installed which it should.
npm run test command runs just fine on the local system.
internal/modules/cjs/loader.js:750
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: Your organization used Device Guard to block this app. Contact your support person for
more info.
\\?\C:\Users\C5281145\AppData\Roaming\sass-binary\win32-x64-67\binding.node
at Object.Module._extensions..node (internal/modules/cjs/loader.js:750:18)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
at Module.require (internal/modules/cjs/loader.js:657:17)
at require (internal/modules/cjs/helpers.js:22:18)
at module.exports (C:\SRM\SRM_Workspace\sr\infonet\src\main\resources\node\node_modules\node-
sass\lib\binding.js:19:10)
at Object.<anonymous>
(C:\SRM\SRM_Workspace\sr\infonet\src\main\resources\node\node_modules\node-
sass\lib\index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:721:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
I have tried uninstalling node_modules and then running yarn command
Tried everything on google..
Nothing worked for me
I've been stuck with this same problem this one whole day. After hours of digging, finally I solved it by updating my PC's Microsoft Visual C++ Redistributable file. You may find the download link here: https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0
Hope your problem will be solved as well!
Thanks a lot to Solant#Github!
I had a similar issue while trying to execute this single nodejs script from Windows 10: const cv = require('opencv4nodejs');
The solution: to start the command line as an administrator, before issuing the command: node <yourScript>
I'm trying to update my project from Angular 4 to Angular 6.
I followed the update steps found on the Angular website and all goes quite smoothly.
However, when trying to use the rxjs-5-to-6-migrate script, it crashes.
I've tried various variations of paths, but noothing seems to work.
I've no idea what's going on...
PS D:\workspace\project> rxjs-5-to-6-migrate -p src/tsconfig.app.json
Running the automatic migrations. Please, be patient and wait until the execution completes.
child_process.js:615
throw err;
^
Error: Command failed: "d:\Applications\node-v9.11.1-win-x64\node_modules\rxjs-tslint\node_modules\.bin\tslint" -c "d:\Applications\node-v9.11.1-win-x64\node_modules\rxjs-tslint\rxjs-5-to-6-migrate.json" -p "src/tsconfig.app.json" --fix
at checkExecSyncError (child_process.js:575:11)
at Object.execSync (child_process.js:612:13)
at migrate (d:\Applications\node-v9.11.1-win-x64\node_modules\rxjs-tslint\rxjs-5-to-6-migrate.js:18:34)
at Object.<anonymous> (d:\Applications\node-v9.11.1-win-x64\node_modules\rxjs-tslint\rxjs-5-to-6-migrate.js:25:14)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Module.require (internal/modules/cjs/loader.js:598:17)
Apparently it was a outdated dependency (probably tslint) what caused this. After updating all dependencies in the package.json, it worked.
I am new to Marklogic 8 , and I was hoping some experts here can help me out. Essentially, I have installed ML8 and had successfully run through some of the exercises that were suggested. I would like to test SampleStack, so I proceeded with the instructions here.
I'm not able to install the browser application, with the information presented here, specifically the section to "Set up the Angular.js/Gulp development environment" ().
here is my current challenge:
gulp run returns this error:
[00:19:40] Starting 'clean'...
[00:19:40] Finished 'clean' after 8.34 ms
[00:19:40] Starting 'bower-files'...
[00:19:40] Finished 'bower-files' after 39 ms
[00:19:40] Starting 'build'...
[00:19:41] 'build' errored after 453 ms
[00:19:41] Error: The specified procedure could not be found.
G:\app\marklogic\marklogic-samplestack-master\browser\node_modules\gulp-sass\node_modules\node-sass\vendor\win32-x64\binding.node
at Error (native)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (G:\app\marklogic\marklogic-samplestack-master\browser\node_modules\gulp-sass\node_modules\node-sass\lib\index.js:211:15)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
[00:19:41] processing files
[00:19:42] saw 217 files
A quick check of gulp tells me both have been set to 3.8.11
G:\app\marklogic\marklogic-samplestack-master\browser>gulp -v
[00:23:52] CLI version 3.8.11
[00:23:52] Local version 3.8.11
any assistance would be appreciated.
It looks like you've run into an issue with node-sass on node v0.12, which is expected to be fixed in node-sass v2.0.0.
As discussed in that thread, you can manually compile and link node-sass to fix the issue. Or, as discussed in this answer, you can downgrade node to v0.10.