bubblewrap init throws -bash: bubblewrap: command not found - node.js

I am building a PWA and following this tutorial to create a TWA. npm i -g #bubblewrap/cli runs fine. When I run
bubblewrap init --manifest=http://localhost:8000/static/manifest.webmanifest
or
bubblewrap init --manifest="http://localhost:8000/static/manifest.webmanifest"
or
bubblewrap init --manifest="<http://localhost:8000/static/manifest.webmanifest>"
I get this error:
-bash: bubblewrap: command not found
I have updated npm and bubblewrap based on this post and am still getting the error. My index.html is inside the static directory.
node v17.6.0
npm v8.5.1
java v17
jdk v11
Does anyone have advice on why bubblewrap isn't being recognized?

Related

i am getting this error even after executing this command "npm install express-hbs --save"

Hey guys I am getting error even after executing the above command if there is any other command to resolve this error please let me know
Error: Cannot find module 'express-hbs'
Before You start using the package - express-hbs, You must install it properly, most likely You installed the package in the wrong place, outside of the project folder.
In the root project folder, run the command:
npm install express-hbs
try again to run nodemon

Contentful UI Extension Tutorial

I am trying to follow the UI Extensions Tutorial
At time code 02:36 I run the npm install && npm run login && npm run configure && npm run start command.
Afterwards I get the error: Cannot find module 'E:\Dev\Contentful\my-first-sidebar\node_modules\#contentful\contentful-extension-scripts\lib\index.js'.
I have globally re-installed the CLI and re-run the install/start command but still same error. I have also searched my hard drive for the contentful-extension-scripts\lib\ folder.
I see I have a contentful-extensions-scripts and contentful-extensions-scripts.cmd files and tried to run the cmd file but no use.
I am running on a Windows 10 box. Node version: 10.16.3​, Npm version: 6.9.0
UPDATE
I found the GitHub Repo for contentful-extensions-scripts, cloned it and copied over the folder but now I get the error: Cannot find module 'parcel-bundler' and I am out of my depth.
Add the following line to package.json to fix it:
"#contentful/contentful-extension-scripts": "^0.14.0".

CSSO npm not working while others are

I’m new to Node.js & npm and am trying to figure out why the uglifyjs module is working while the csso module is not.
i recently moved my global install to following location
/Users/myname/.node_modules_global/bin/npm
via this tutorial’s recommendation.
https://www.sitepoint.com/beginners-guide-node-package-manager/
to show they are both installed globally i do this via the command line
npm list -g --depth=0
and i get this result
/Users/myname/.node_modules_global/lib
csso#3.1.1
npm#5.3.0
uglify-js#3.0.25
for testing purposes i navigate to a local static site and run the commands using the CLI.
the uglifyjs command works. but when running the command for csso which is
$csso style.css style.min.css
i get this error
bash: csso: command not found
i’m at a loss how to even troubleshoot except this.
I think you are missing the CLI version. Please try:
npm i csso-cli
to install it.

Webpack failed to compile npm start

I got a project that I need to work on. I forked the project from gitlab, unzipped it into my workspace folder, ran terminal and the following commands
node --version
npm --version
npm install
npm init
npm start
This should have installed all devDependencies (I turned production to false) and the server should be up and running. However, I'm getting the following error
`ERROR in .//src/client/index.js
Module build failed: Error: No ESLint configuration found.
at getLocalConfig ((dir)\node_modules\eslint\lib\config.js:162:35)
at Config.getConfig ((dir)\node_modules\eslint\lib\config.js:259:26)
at processText ((dir)\node_modules\eslint\lib\cli-engine.js:224:33)
at CLIEngine.executeOnText ((dir)\node_modules\eslint\lib\cli-engine.js:754:26)
at lint ((dir)\node_modules\eslint-loader\index.js:44:31)
at Object.module.exports ((dir)\node_modules\eslint-loader\index.js:181:3)
webpack: Failed to compile.`
I do have a eslintrc both on root dir and /src/client. What am I missing here ?

AWS Elastic Beanstalk Node.js npm install error

During the deployment of an application, npm install is unable to install a very particular dependency:
npm ERR! enoent ENOENT: no such file or directory, chmod '/tmp/deployment/application/node_modules/babel-core/node_modules/regexpu/node_modules/regjsparser/node_modules/jsesc/bin/jsesc'
I was able to find that above error by ssh'ing into the particular EC2 instance hosting my Node application and running npm install via the command below:
sudo /opt/elasticbeanstalk/containerfiles/ebnode.py --action npm-install 2
Then follows with this generic failure:
Failed to run npm install. Snapshot logs for more details.
No environment variable EB_EVENT_FILE found. Writing message to stderr.
Msg: Failed to run npm install. Snapshot logs for more details.
What's weird is that I've been able to deploy successfully once before, and am using the same exact configurations for that previous deployment. My only command is npm start within .ebextensions/.
Within my package.json, I changed all dev dependencies into dependencies, as webpack is building during prestart.
This all builds and runs locally, by the way. Also I'm using Node 4.2.1 and npm 2.14.7 on EB.
Any help would be awesome. Thanks!
I ended up just creating and deploying a Docker container to solve this issue. Deploying to the environment provided by EB is too nondeterministic - the dependency tree wasn't created correctly.

Resources