I try to install Plotly extension to Jupiterlab. After I installed every package (Anaconda, jupyterlab "ipywidgets>=7.5") I try to install "jupyter labextension install jupyterlab-plotly#4.14.3" but I got an error message: RuntimeError: JupyterLab failed to build
I try to identify the problem from the Log file, but I have no idea what to do next
The log file:
Yarn configuration loaded.
Node v15.12.0
"C:\Users\Szarka Roland\anaconda3\npm.CMD" pack jupyterlab-plotly#4.14.3
npm notice
npm notice package: jupyterlab-plotly#4.14.3
npm notice === Tarball Contents ===
npm notice 156B README.md
npm notice 6.3kB dist/javascript-renderer-extension.js
npm notice 1.0kB package.json
npm notice 545B style/index.css
npm notice 1.0kB style/plotly.svg
npm notice === Tarball Details ===
npm notice name: jupyterlab-plotly
npm notice version: 4.14.3
npm notice filename: jupyterlab-plotly-4.14.3.tgz
npm notice package size: 3.1 kB
npm notice unpacked size: 9.1 kB
npm notice shasum: bb424a50226c2ce1b816f061a8123f0f42418fc0
npm notice integrity: sha512-6ZdmIQ5fDiBTY[...]nASwRNCf1U1Cg==
npm notice total files: 5
npm notice
jupyterlab-plotly-4.14.3.tgz
Yarn configuration loaded.
Node v15.12.0
Building jupyterlab assets (build:prod:minimize)
> node "C:\Users\Szarka Roland\anaconda3\lib\site-packages\jupyterlab\staging\yarn.js" install --non-interactive
yarn install v1.15.2
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents#1.2.11: The platform "win32" is incompatible with this module.
info "fsevents#1.2.11" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning "jupyterlab-plotly > #lumino/widgets > #lumino/coreutils#1.5.3" has unmet peer dependency "crypto#1.0.1".
[5/5] Building fresh packages...
success Saved lockfile.
Done in 9.81s.
> node "C:\Users\Szarka Roland\anaconda3\lib\site-packages\jupyterlab\staging\yarn.js" yarn-deduplicate -s fewer
yarn run v1.15.2
error Command "yarn-deduplicate" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
> node "C:\Users\Szarka Roland\anaconda3\lib\site-packages\jupyterlab\staging\yarn.js"
yarn install v1.15.2
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
Done in 0.52s.
> node "C:\Users\Szarka Roland\anaconda3\lib\site-packages\jupyterlab\staging\yarn.js" run build:prod:minimize
yarn run v1.15.2
$ ensure-max-old-space webpack --config webpack.prod.minimize.config.js
node:internal/modules/cjs/loader:352
throw err;
^
Error: Cannot find module 'C:\Users\Szarka Roland\anaconda3\share\jupyter\lab\staging\node_modules\which\which.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (node:internal/modules/cjs/loader:344:19)
at Function.Module._findPath (node:internal/modules/cjs/loader:557:18)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:910:27)
at Function.Module._load (node:internal/modules/cjs/loader:769:27)
at Module.require (node:internal/modules/cjs/loader:996:19)
at require (node:internal/modules/cjs/helpers:92:18)
at Object.<anonymous> (C:\Users\Szarka Roland\anaconda3\share\jupyter\lab\staging\node_modules\#jupyterlab\buildutils\lib\ensure-max-old-space.js:28:28)
at Module._compile (node:internal/modules/cjs/loader:1092:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
at Module.load (node:internal/modules/cjs/loader:972:32) {
code: 'MODULE_NOT_FOUND',
path: 'C:\\Users\\Szarka Roland\\anaconda3\\share\\jupyter\\lab\\staging\\node_modules\\which\\package.json',
requestPath: 'which'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
JupyterLab failed to build
Traceback (most recent call last):
File "C:\Users\Szarka Roland\anaconda3\lib\site-packages\jupyterlab\debuglog.py", line 47, in debug_logging
yield
File "C:\Users\Szarka Roland\anaconda3\lib\site-packages\jupyterlab\labextensions.py", line 105, in start
command=command, app_options=app_options)
File "C:\Users\Szarka Roland\anaconda3\lib\site-packages\jupyterlab\commands.py", line 459, in build
command=command, clean_staging=clean_staging)
File "C:\Users\Szarka Roland\anaconda3\lib\site-packages\jupyterlab\commands.py", line 669, in build
raise RuntimeError(msg)
RuntimeError: JupyterLab failed to build
Exiting application: jupyter
Related
yarn -v
node:internal/modules/cjs/loader:998
throw err;
^
Error: Cannot find module '/Users/sadeepa/.yarn/releases/yarn-3.3.1.cjs'
at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
at Module._load (node:internal/modules/cjs/loader:841:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v18.12.1
Any one please help? Thanks
I want to reinstall yarn because of some problems then I tried to uninstall all the yarn things and install again so I get errors
Hi I have got the same problem
ubuntu#ip-xxx-xx-x-xxx:~/yarn
node:internal/modules/cjs/loader:988
throw err;
^
Error: Cannot find module '/home/ubuntu/.yarn/releases/yarn-3.3.1.cjs'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
at Function.Module._load (node:internal/modules/cjs/loader:833:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:22:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
and I found the file named .yarnrc.yml and remove it
ubuntu#ip-xxx-xx-x-xxx:~$ cat .yarnrc.yml
yarnPath: .yarn/releases/yarn-3.3.1.cjs
ubuntu#ip-xxx-xx-x-xxx:~$ rm .yarnrc.yml
ubuntu#ip-xxx-xx-x-xxx:~$ yarn
yarn install v1.22.19
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 0.07s.
ubuntu#ip-xxx-xx-x-xxx:~$ yarn -v
1.22.19
When I tried to install near-sdk-as on my laptop (Intel-based macOS 10.13) with the command:
yarn add -D near-sdk-as
I got the following error:
❯ yarn add -D near-sdk-as
yarn add v1.22.17
info No lockfile found.
[1/4] 🔍 Resolving packages...
warning near-sdk-as > near-sdk-core > near-vm > binary-install > axios#0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "near-sdk-as > near-sdk-core > #as-pect/cli#6.2.4" has incorrect peer dependency "assemblyscript#^0.19.3".
warning "near-sdk-as > near-sdk-core > #as-pect/cli > #as-pect/assembly#6.2.0" has incorrect peer dependency "assemblyscript#^0.19.3".
warning "near-sdk-as > near-sdk-core > #as-pect/cli > #as-pect/core#6.2.1" has incorrect peer dependency "assemblyscript#^0.19.3".
[4/4] 🔨 Building fresh packages...
error /Users/admin/Develop/Learn-Near/NEAR-101/node_modules/near-vm: Command failed.
Exit code: 1
Command: node ./install.js
Arguments:
Directory: /Users/admin/Develop/Learn-Near/NEAR-101/node_modules/near-vm
Output:
/Users/admin/Develop/Learn-Near/NEAR-101/node_modules/follow-redirects/node_modules/debug/src/debug.js:47
hash = ((hash <
SyntaxError: Unexpected end of input
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1032:15)
at Module._compile (node:internal/modules/cjs/loader:1067:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Users/admin/Develop/Learn-Near/NEAR-101/node_modules/follow-redirects/node_modules/debug/src/node.js:14:28)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Other info:
npm version: 8.3.1
yarn version: v1.22.17
Any thoughts on how to fix the error and complete the sdk installation?
Thanks!
Try yarn cache clean --force first, then rerun yarn.
Why? You have broken dependency files cached, so you want to clean the cache and download from scratch
I have deployed my app from git to Heroku successfully and I enabled automatic deployment that worked fine.
Somewhere in the past 2 weeks the deployment has started failing each time for the same reason, even though there's no problem with the code in the git - it's running fine.
You can see in the log file that it mentions each time:
" Creating an optimized production build...
Failed to compile.
./src/App.js
Cannot find file './pages/MainPage' in './src'.
But the MainPage file is right where it should be and the app is compiling and running locally.
I've tried disconnecting and reconnecting from git and heroku,
I've deleted and re-installed the node modules and the package-lock,
and I cache clean --force.
I don't know what went wrong, any suggestions?
Thank you!
-----> React.js (create-react-app) multi app detected
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-multi.git
=====> Detected Framework: Multipack
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git
=====> Detected Framework: Node.js
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_ENV=production
NODE_MODULES_CACHE=true
NODE_VERBOSE=false
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
Resolving node version 12.x...
Downloading and installing node 12.20.0...
Using default npm version: 6.14.8
-----> Restoring cache
Cached directories were not restored due to a change in version of node, npm, yarn or stack
Module installation may take longer for this build
-----> Installing dependencies
Installing node modules
> core-js#2.6.12 postinstall /tmp/build_826a0ec4_/node_modules/babel-runtime/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
> fsevents#1.2.13 install /tmp/build_826a0ec4_/node_modules/webpack-dev-server/node_modules/fsevents
> node install.js
Skipping 'fsevents' build as platform linux is not supported
> fsevents#1.2.13 install /tmp/build_826a0ec4_/node_modules/watchpack-chokidar2/node_modules/fsevents
> node install.js
Skipping 'fsevents' build as platform linux is not supported
> core-js#3.8.0 postinstall /tmp/build_826a0ec4_/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
> fsevents#1.2.13 install /tmp/build_826a0ec4_/node_modules/jest-haste-map/node_modules/fsevents
> node install.js
Skipping 'fsevents' build as platform linux is not supported
> core-js-pure#3.8.0 postinstall /tmp/build_826a0ec4_/node_modules/core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"
added 1695 packages in 29.379s
-----> Build
Running build
> rosenflix#0.1.0 build /tmp/build_826a0ec4_
> react-scripts build
Creating an optimized production build...
Failed to compile.
./src/App.js
Cannot find file './pages/MainPage' in './src'.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! rosenflix#0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the rosenflix#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.Zqszt/_logs/2020-12-02T21_16_51_485Z-debug.log
-----> Build failed
We're sorry this build is failing! You can troubleshoot common issues here:
https://devcenter.heroku.com/articles/troubleshooting-node-deploys
Some possible problems:
- Node version not specified in package.json
https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
Love,
Heroku
! Push rejected, failed to compile React.js (create-react-app) multi app.
! Push failed
Your production build may be referencing a relative import that for some reason does not exist. Reconfigure that import using ${__dirname}/path_to_file and try again.
Here is a link of how to use it.
Hope this works for you.
New to React Native I've made sure to install node.js from here and after install I'm told:
Node.js v9.5.0 to /usr/local/bin/node
npm v5.6.0 to /usr/local/bin/npm
I can verify the node version:
node --version: v9.5.0
I ran the documentation's getting started for npm install:
npm install -g create-react-native-app
and also referenced building projects and installed watchman with brew:
watchman 4.9.0
in the terminal ran: npm install -g react-native-cli and terminal: npm start and I get:
grim ~/react-native/react-native npm start
> react-native#1000.0.0 start /Users/grim/React-Native/react-native
> /usr/bin/env bash -c './scripts/packager.sh "$#" || true' --
module.js:557
throw err;
^
Error: Cannot find module 'graceful-fs'
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> (/Users/grim/React-Native/react-native/local-cli/cli.js:12:1)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
grim ~/react-native/react-native
After research I found NPM, cannot find 'graceful-fs', no matter what I do and in terminal ran:
sudo npm install -g graceful-fs
and get:
+ graceful-fs#4.1.11
added 1 package in 0.678s
but when I run npm install I get:
npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "npm:": npm:babylon#^7.0.0-beta
npm WARN deprecated gulp-util#3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/grim/.npm/_logs/2018-02-08T17_08_50_619Z-debug.log
and in the file log it shows:
116 error code EUNSUPPORTEDPROTOCOL
117 error Unsupported URL Type "npm:": npm:babylon#^7.0.0-beta
so I went to The Problem with gulp-util but when I do:
npm ls gulp-util
I get └── (empty).
Further research I found Why is my npm install not working? but that throws an npm ERR! What am I doing wrong and how can I get npm successfully installed on my Mac running Seirra?
What caused this was trying to test RNTester from the react native repo and it told me:
git clone https://github.com/facebook/react-native.git
cd react-native
npm install
Edit
Per the suggested answer already tried brew install node and was told with a warning node 9.5.0 is already installed so tried brew link node then prompted:
grim ~/react-native/react-native brew link node
Linking /usr/local/Cellar/node/9.5.0...
Error: Could not symlink bin/node
Target /usr/local/bin/node
already exists. You may want to remove it:
rm '/usr/local/bin/node'
To force the link and overwrite all conflicting files:
brew link --overwrite node
To list all files that would be deleted:
brew link --overwrite --dry-run node
so ran brew link --overwrite node.
Edit
Browsing through my files under Users/grim I found a directory with modules in it named node_modules could that be in the wrong location?
Edit
After further research I found Fixing npm On Mac OS X for Homebrew Users and ran:
rm -rf /usr/local/lib/node_modules
brew uninstall node
brew install node --without-npm
echo prefix=~/.npm-packages >> ~/.npmrc
curl -L https://www.npmjs.com/install.sh | sh
modified my ~/.bash_profile with nano:
export PATH="$HOME/.npm-packages/bin:$PATH"
ran npm install and received a missing package.json file so in the terminal did npm init and answered the questions. Went back and pointed to the cloned repo and when I run npm install:
npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "npm:": npm:babylon#^7.0.0-beta
npm WARN deprecated gulp-util#3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
but if I build a new project with react-native init AwesomeProject and npm install I get:
up to date in 0.416s
and I can point into the project and do react-native run-ios and it works but react-native run-android has to be tweaked in the build.bundle from: classpath 'com.android.tools.build:gradle:2.2.3' to classpath "com.android.tools.build:gradle:2.1.0"
Use Homebrew for Mac as package manager;
https://brew.sh/
then you can run: brew install node
There are many other utilities on this.
create-react-native app does not work with npm 5.
I had the same problem on Windows and downgraded my npm to 4 you can use npm i -g npm#4 to downgrade.
You may try to use yarn command with -W flag (or --ignore-workspace-root-check) which might be helpful.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Regards
Trying to get code running from my groups repo.... everyone elses seems to install and run fine, but my setup is having issues. Not sure if this is a dependency issue or not.
Tried removing node / npm / nvm and reinstalling everything including code from repo. Still having issues...
React : 0.14.8
react-native-cli: 0.2.0
react-native: 0.24.0
also react-native-cli was installed globally
with npm install -g react-native-cli
command after install : react-native run-ios
getting
/node_modules/react-native/Libraries/react-native/react-native.js:121
...require('React'),
^^^
SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:414:25)
at Module._extensions..js (module.js:442:10)
at Object.require.extensions.(anonymous function) as .js
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
node_modules/react-native/node_modules/babel-core/lib/transformation/file/options/option-manager.js:409:22
at Array.map (native)
In npm#3 subDependencies are installed at the same level of your project dependencies (./node_modules). My guess is the project is missing some dependencies to run the packager. If you haven't already done so, updgrade to npm#3 ($ npm install -g npm), delete your node_modules folder, then try again.
$ rm -rf node_modules && npm install