Hi I'm a beginner learning React & I'm trying out Storybook and I am having the following error when I try to run Storybook. **I tried to update by using npm update, I thought there was conflict with my dependencies **
ERROR in ./.storybook/generated-refs.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: You gave us a visitor for the node type StaticBlock but it's not a valid type
at verify (C:\Users\msngw\OneDrive\Desktop\SBook\myapp\node_modules\#babel\traverse\lib\visitors.js:112:13)
at explode (C:\Users\msngw\OneDrive\Desktop\SBook\myapp\node_modules\#babel\traverse\lib\visitors.js:34:3)
at Object.merge (C:\Users\msngw\OneDrive\Desktop\SBook\myapp\node_modules\#babel\traverse\lib\visitors.js:147:5)
at Object.<anonymous> (C:\Users\msngw\OneDrive\Desktop\SBook\myapp\node_modules\#babel\helper-replace-supers\lib\index.js:60:44)
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 Module.require (internal/modules/cjs/loader.js:903:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (C:\Users\msngw\OneDrive\Desktop\SBook\myapp\node_modules\#babel\helper-create-class-features-plugin\lib\fields.js:13:52)
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 Module.require (internal/modules/cjs/loader.js:903:19)
# multi ./node_modules/#storybook/core/dist/server/common/polyfills.js ./node_modules/#storybook/core/dist/client/manager/index.js ./node_modules/#storybook/addon-links/dist/register.js ./node_modules/#storybook/addon-actions/dist/register.js ./node_modules/#storybook/addon-docs/dist/register.js ./node_modules/#storybook/addon-controls/dist/register.js ./node_modules/#storybook/addon-backgrounds/dist/register.js ./node_modules/#storybook/addon-viewport/dist/register.js ./node_modules/#storybook/addon-toolbars/dist/register.js ./.storybook/generated-refs.js main[9]
This bug has been already raised in the Storybook repo. As mentioned there, removing yarn.lock and node_modules, then re-installing using yarn, fixed all issues.
Related
There is a similar question on StackOverFlow but it was unhelpful and it wasn't answered. I have been working on a project and I currently am receiving this error.
Error: Cannot find module 'update-notifier'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at /usr/local/lib/node_modules/npm/bin/npm-cli.js:29:19
at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:92:3)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
If I type any command that includes npm it returns the same error, I can't install anything.
I have tried to uninstall/re-install NodeJS with homebrew but nothing changed from trying that.
I am trying to run a canvas project in local(development) environment by referring https://github.com/instructure/canvas-lms/wiki/Quick-Start
If I try to run rails server then it throws an error like RuntimeError (you need to run webpack). While fixing this issue, I have referred some blogs and try to run webpack server. Again it will throws an error like Error: Cannot find module ...
Example:
module.js:487
throw err;
^
Error: Cannot find module 'yargs'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/lib/node_modules/webpack/bin/webpack.js:16:13)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
I am using Ubuntu 16.04 and webpack version is 3.0.0
How can I fix these issues? Please help me to run this canvas project.
I installed node-opencv for win10 x64. But when I run my app included opencv get an error.
>node app.js
module.js:434
return process.dlopen(module, path._makeLong(filename));
^
Error: The specified module could not be found.
\\?\C:\Users\...\node_modules\opencv\build\opencv\v6.0.0\Release\node-v46-win32-x64\opencv.node
at Error (native)
at Object.Module._extensions..node (module.js:434:18)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (C:\Users\...\node_modules\opencv\lib\bindings.js:4:15)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)`
I tried to start "cmd" as a root. After that the error is gone. But I want to deploy my project on a hosting and anyone won't give me administrative privileges... So I need a tip that let me start app as simple user.
I'm running node v4.8.3, NPM 4.5.0.
This means that the DLLs can not be opened. You either don't have the opencv binaries dir in your system path or the DLLs do not match the .lib or .so files that you linked against.
Following to my previous question, I'm trying to use protocol buffers in node.js. I've generated ServiceMessage_pb.js from my ServiceMessage.proto, and add the following code:
var messages = require('./ServiceMessage_pb');
Now I'm getting the following error in my node log:
Error: Cannot find module 'google-protobuf'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/home/aii/ws/ServiceMessage_pb.js:8:12)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
Any suggestions how to solve this?
Thanks
npm i google-protobuf
I run into so many problem installing just "protobuf" !
Also the official protobuf javascript package is "google-protobuf":
https://www.npmjs.com/package/google-protobuf
You can install the module with npm:
npm install --save protobuf
Then require it this way:
var my_protobuff = require ("protobuf");
I have upgraded from Node.js 0.12.7 to 4.2.1, getting the following error when starting my server:
$ node server.js
C:\Users\me\documents\github\angular-express-auth\node_modules\bcrypt\node_modules\bindings\bindings.js:83
throw e
^
Error: The specified procedure could not be found.
\\?\C:\Users\me\documents\github\angular-express-auth\node_modules\bcrypt\build\Release\bcrypt_lib.node
at Error (native)
at Object.Module._extensions..node (module.js:460:18)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at bindings (C:\Users\me\documents\github\angular-express-auth\node_modules\bcrypt\node_modules\bindings\bindings.js:76:44)
at Object.<anonymous> (C:\Users\me\documents\github\angular-express-auth\node_modules\bcrypt\bcrypt.js:3:35)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (C:\Users\me\documents\github\angular-express-auth\server\config\mongo_database.js:2:14)
at Module._compile (module.js:435:26)
In fact the node-gyp build is failing that's causing this specific issue or vice-versa, not sure how exactly both are linked.It was working perfectly fine till the Node.js version upgrade. I have the dependencies installed (Python v2.7.3,Microsoft Visual c++ 2015), have the environmental variables setup correctly too. Please help.
It's a problem with the version mismatch between node js and bcrypt module. Uninstalled bcrypt using npm in my project and reinstalled the same, now it's successfully building the node-gyp module (bcrypt installation always builds the node-gyp and creates a new binding file) and the app is running.