I have used npm to download package.json and npm install to install botbuilder and api-ai-recognizer, but it tells me that it cannot find botbuilder. Can someone help me?
I have done the following in my Azure Cloud Shell:
mkdir weather-bot
cd weather-bot
npm init
npm install --save botbuilder api-ai-recognizer
cd ~
touch index.js
vi index.js
var builder = require('botbuilder');
var connector = new builder.ConsoleConnector().listen();
var bot = new builder.UniversalBot(connector);
bot.dialog('/',function(session){ session.send("You said %s", session.message.text); });
After I start the node server
node index.js hi You said hi hello You said hello
I get the error "Error: Cannot find module 'botbuilder'" .
It appears you installed your npm modules in weather-bot (i.e. ~/weather-bot/node_modules), but you have put your index.js file at the root (i.e. ~/index.js). So when you are trying to run your bot, it is looking in ~/node_modules for the botbuilder module, but it's not installed there. Try moving your index.js file to your weather-bot directory and see if it works.
Related
Suddenly I received the following error:
app.js:28823 Uncaught Error: Cannot find module 'os'
at webpackMissingModule (app.js:28823)
at Object../node_modules/laravel-mix/src/File.js (app.js:28823)
at __webpack_require__ (app.js:79613)
at Object../resources/js/app.js (app.js:6700)
at __webpack_require__ (app.js:79613)
at app.js:79751
at Function.__webpack_require__.O (app.js:79650)
at app.js:79753
at app.js:79755
I tried deleting the node_module folder and the package-lock.json file, and run npm install, to no avail.
When I launch npm run dev I get the following error:
Error: Can't resolve 'os' in 'C:\...\node_modules\clean-css\lib\options'" -t "Laravel Mix"
UPDATE: I run npm install --save os and this problem was solved. But another one arose! Error: Can't resolve 'fs' and this one doesn't resolve with npm install --save fs
NPM version: 7.18.1
SOLVED: I don't know how in the top of resources\js\app.js file appeared this line:
const { exists } = require("laravel-mix/src/File");
I just deleted it and npm run dev didn't give any more errors.
I hope this answer will help someone else.
This all happens when you auto-import the modules using any extension.
Solution:
delete the package-lock.json file and run:
npm i
it works for me.
Another solution is to remove the
import { exists } from 'laravel-mix/src/File'
from the react component first line and it works.
NPM has been installed by the Azure DevOps agent install on my mac os Mojave v10.14.6. I can access the npm but any commadn gives tha same error. this is the only command that work
sudo npm --version =6.12.0
sudo npm -p process.platform = darwin
this is the same error message I get for any other command:
Error: EISDIR: illegal operation on a directory, read TypeError:
Cannot read property 'loaded' of undefined
at exit (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:97:27)
at errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:216:3)
at /usr/local/lib/node_modules/npm/bin/npm-cli.js:78:20
at cb (/usr/local/lib/node_modules/npm/lib/npm.js:225:22)
at /usr/local/lib/node_modules/npm/lib/npm.js:263:24
at /usr/local/lib/node_modules/npm/lib/config/core.js:81:7
at Array.forEach ()
at /usr/local/lib/node_modules/npm/lib/config/core.js:80:13
at f (/usr/local/lib/node_modules/npm/node_modules/once/once.js:25:25)
at finalize (/usr/local/lib/node_modules/npm/lib/config/core.js:187:14)
/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:97 var
doExit = npm.config.loaded ? npm.config.get('_exit') : true
I have downloaded the latest version node version from nodejs.org and this has not help.
I believe the problem is that it is missing the .npmrc but i might be wrong.
I ran locate command and here are all the results anything under deb/myagent is azure devops pulled source for building the apps:
Mac-mini:/ sedev$ locate .npmrc
/Applications/Xcode.app/Contents/Developer/usr/share/xcs/xcsd/node_modules/nsp/node_modules/npmconf/test/fixtures/.npmrc
/Applications/Xcode.app/Contents/Developer/usr/share/xcs/xcsd/node_modules/nsp/node_modules/silent-npm-registry-client/node_modules/npm-registry-client/node_modules/npmlog/.npmrc
/Users/sedev/.npmrc
/Users/sedev/myagent/_work/10/s/app.WebUi/wwwroot/bower_components/vaadin-checkbox/.npmrc
/Users/sedev/myagent/_work/10/s/app.WebUi/wwwroot/bower_components/vaadin-control-state-mixin/.npmrc
/Users/sedev/myagent/_work/10/s/app.WebUi/wwwroot/bower_components/vaadin-element-mixin/.npmrc
/Users/sedev/myagent/_work/10/s/app.WebUi/wwwroot/bower_components/vaadin-grid/.npmrc
/Users/sedev/myagent/_work/10/s/app.WebUi/wwwroot/bower_components/vaadin-grid-5.0.0-alpha6/.npmrc
/Users/sedev/myagent/_work/10/s/app.WebUi/wwwroot/bower_components/vaadin-icons/.npmrc
/Users/sedev/myagent/_work/10/s/app.WebUi/wwwroot/bower_components/vaadin-text-field/.npmrc
/Users/sedev/myagent/_work/10/s/app.WebUi/wwwroot/bower_components/vaadin-themable-mixin/.npmrc
Mac-mini:/ sedev$
The answer was the .npmrc was corrupt or something. I had to remove it and it worked
sudo rm /Users/sedev/.npmrc
It Is Possible someTime That Node has crashed.
so solution Is That Uninstall NodeJs and Install it Againg
Install for [ 'browserslist#latest' ] => npm i browserslist#latest
I try to create a custom plugin. Wheni import Image from '#ckeditor/ckeditor5-image/src/image' i get an error
This dependency was not found:
* -!../../../css-loader/index.js??ref--6-oneOf-3-1!../../../postcss- loader/src/index.js??ref--6-oneOf-3-2!./#ckeditor/ckeditor5-theme- lark/theme/mixins/_rwd.css in ./node_modules/css-loader??ref--6-oneOf-3-
1!./node_modules/postcss-loader/src??ref--6-oneOf-3-
2!./node_modules/#ckeditor/ckeditor5-image/theme/textalternativeform.css
To install it, you can run: npm install --save -!../../../css-
loader/index.js??ref--6-oneOf-3-1!../../../postcss-loader/src/index.js??
ref--6-oneOf-3-2!./#ckeditor/ckeditor5-theme-lark/them
How should i fix it? I've installed this package https://github.com/ckeditor/ckeditor5-theme-lark and there is no effect.
Make sure you have created the vue.config.js file and included the details from
https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/frameworks/vuejs.html
Make sure #ckeditor/ckeditor5-theme-lark is installed
npm install --save #ckeditor/ckeditor5-theme-lark
That should then fix the issue
after modified the vue.config.js make sure you are re-run again your VUE application
npm run dev
or
npm run serve
In my case, I got same error because I did not follow the guide very well. After read it I had to run this:
npm install #ckeditor/ckeditor5-theme-lark
npm install --save #ckeditor/ckeditor5-vue2 #ckeditor/ckeditor5-dev-webpack-plugin #ckeditor/ckeditor5-dev-utils postcss-loader#4 raw-loader#4
For specific modules selected, something like this:
npm install --save #ckeditor/ckeditor5-basic-styles #ckeditor/ckeditor5-editor-classic #ckeditor/ckeditor5-horizontal-line #ckeditor/ckeditor5-alignment #ckeditor/ckeditor5-autosave #ckeditor/ckeditor5-adapter-ckfinder #ckeditor/ckeditor5-essentials #ckeditor/ckeditor5-font #ckeditor/ckeditor5-heading #ckeditor/ckeditor5-image #ckeditor/ckeditor5-indent #ckeditor/ckeditor5-link #ckeditor/ckeditor5-list #ckeditor/ckeditor5-paragraph #ckeditor/ckeditor5-paste-from-office #ckeditor/ckeditor5-remove-format #ckeditor/ckeditor5-typing #ckeditor/ckeditor5-basic-styles
Then, in my case I use VUE 2+ version, so I had to modify the vue.config.js file, accorging the official documentation: https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/frameworks/vuejs-v2.html
Plase check the documentation with your specific framework: https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/frameworks/overview.html
I recently installed Oracle jet and I haven't made any changes to it. I created my first project today and it's showing error when I try to build it or serve it. I am trying to run it on Visual Studio (I don't this matters tho)
This is the error I am getting
PM> ojet serve ojet : [31mError: Your JET project does not have oraclejet-tooling installed.[0m
At line:1 char:
+ ojet serve
+ ~~~~~~~~~~
+ CategoryInfo : NotSpecified: ([31mError: You... installed.[0m:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
UPDATE: Apparently when I create a new template it is creating an error from there itself the app structure is generated but during invoking mom install it is unable to parse through some certain JSON
Following is the Error:
ojet create ojetnavbar --template=navbar
Processing template: navbar
Your app structure is generated. Continuing with library install.
Performing npm install may take a bit.
Invoking npm install.
npm WARN deprecated coffee-script#1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm ERR! Unexpected end of JSON input while parsing near '...oIzTWjIvO8rspcLCK+1pI'
npm ERR! A complete log of this run can be found in:
npm ERR! *location of log*
Error: (during Invoking npm install.) 1
$ npm install -g #oracle/ojet-cli
$ npm install -g #oracle/oraclejet-tooling
$ ojet restore
This will solve your problem
I have sorted out on the issue it was because the JSON npm was trying to parse were mostly cached and due to that a parsing error was occurring
I used npm-cache clean on my PC and all of it ran after that perfectly fine.
I think you need to add oraclejet tooling to your project. Try this:
cd appDir
npm install #oracle/oraclejet-tooling --save
oraclejet-tooling package has been deprecated, you have to use module contains a command-line interface for Oracle JET web and hybrid mobile application development.
See https://www.npmjs.com/package/#oracle/ojet-cli
cd oracle-jet-simple-web
npm install #oracle/ojet-cli --save
For me this helped
npm i #oracle/oraclejet-tooling
Here is the link: npmjs.com/package/#oracle/oraclejet-tooling
After successfully installing vue-cli, I can't run vue init webpack my-project command. It returns bash: vue: command not found.
And I tried react-cli, using create-react-app project-name and still returns bash: create-react-app: command not found
I already checked it using npm list -g --depth=0 and it was installed in
C:\Users\userlocal\AppData\Roaming\npm
+-- create-react-app#1.5.2
`-- vue-cli#2.9.3
My PC is running on Windows7/Ultimate, and I am using node v8.9.4, and npm 5.8.0
Am I missing something here?